Snippet

References
public sealed class Snippet
A pointer to a GHZ file containing a bunch of components acting as a snippet. The basic descriptive properties (Nomen, Icon) are read lazily from standalone chunks in the archive so the snippet can be drawn in the UI without deserialising the document graph. The document is only opened when a Preview bitmap is requested.

Constructors

Snippet

#
Create a new snippet. Construction is cheap; archive contents are only read when Nomen, Icon or Preview is accessed.
public Snippet(
file
)

Properties

File

#
File path for snippet.
public string File { get; }

Icon

#
Gets the icon for this snippet. Loaded lazily from the archive's standalone icon chunk. If no icon chunk is present, the document is deserialised on first access and an icon is derived from its objects (preferring custom-iconned objects, then rightmost components, then rightmost other objects).
public IIcon Icon { get; }

Id

#
Gets a stable identifier for this snippet, derived from its file path.
public Guid Id { get; }

Nomen

#
Gets the nomen describing this snippet. Loaded lazily from the archive's standalone chunks (NameEntry, InfoEntry, SectionEntry).
public Nomen Nomen { get; }

Preview

#
A preview of the snippet file. Forces a full document deserialisation on first access.
public Bitmap Preview { get; }

Time

#
Gets the time this file was last changed.
public DateTime Time { get; }