GH_RuntimeFile

References
public class GH_RuntimeFile
Runtime representation of a Grasshopper help file. A GH_RuntimeFile is nothing more than a collection of keywords with associated content. This class does not interpret a file or check its validity, it merely figures out the different content section based on "Keyword:" entries.

Fields

TagAuthor

#
String tag used to identify Author fields in documentation source files.
public const string TagAuthor = "AUTHOR"

TagBeginner

#
String tag used t o identify Beginner Level Help Content in documentation source files.
public const string TagBeginner = "BEGINNER"

TagCategory

#
String tag used to identify Category fields in documentation source files.
public const string TagCategory = "CATEGORY"

TagComponent

#
String tag used to identify Component IDs in documentation source files.
public const string TagComponent = "COMPONENT"

TagContact

#
String tag used to identify Author contact details in documentation source files.
public const string TagContact = "CONTACT"

TagDescription

#
String tag used t o identify Description fields in glossary source files.
public const string TagDescription = "DESCRIPTION"

TagErranyms

#
String tag used to identify Do Not Confuse collections in documentation source files.
public const string TagErranyms = "DONTCONFUSE"

TagExpert

#
String tag used t o identify Expert Level Help Content in documentation source files.
public const string TagExpert = "EXPERT"

TagInclude

#
String tag used to signal whether inclusion of a topic is allowed.
public const string TagInclude = "INCLUDE"

TagIntermediate

#
String tag used t o identify Intermediate Level Help Content in documentation source files.
public const string TagIntermediate = "INTERMEDIATE"

TagKeywords

#
String tag used to identify Keyword collections in documentation source files.
public const string TagKeywords = "KEYWORDS"

TagPronunciation

#
String tag used to identify Pronunciaion Guide fields (IPA) in glossary source files.
public const string TagPronunciation = "PRONUNCIATION"

TagRhinoCommand

#
String tag used to identify Similar Rhino Commands in documentation source files.
public const string TagRhinoCommand = "RHINOCOMMAND"

TagSeeAlso

#
String tag used to identify See Also collections in documentation source files.
public const string TagSeeAlso = "SEEALSO"

TagSynonyms

#
String tag used to identify Synonym collections in glossary source files.
public const string TagSynonyms = "SYNONYMS"

TagTitle

#
String tag used to identify title fields in documentation source files.
public const string TagTitle = "TITLE"

Properties

Keys

#
Gets a list of all the keys present in the File.
public List<string> Keys { get; }

Path

#
Gets the path of this help file.
public string Path { get; }

Tags

#
Gets a collection of all the pre-defined keywords. Use IsKeyword(string) if you want to know whether a string equals a keyword. It's both faster and more reliable than comparing against this collection.
public static IEnumerable<string> Tags { get; }

Indexers

Content

#
Gets the data associated with a certain key. For every time the key appears in the file, an array of content strings will be returned.
public List<string[]> this[
key
Key to search for, key comparison is not case-sensitive.
] { get; }

Methods

ContainsKey

#
Test whether a certain key is present in the File.
public bool ContainsKey(
key
Key to search for.
)
True if the key is present in the file, false if not.

IsTag

#
Tests whether a string is a predefined Grasshopper Help keyword.
public static bool IsTag(
text
String to test. Should contain no whitespace, but does not need to properly cased.
)
True if text is a predefined keyword, false if not.

IsTagLine

#
Tests whether a line of text starts with a Grasshopper Help keyword.
public static bool IsTagLine(
line,
Line of text to test.
ref string
keyword,
This is where the keyword is returned.
ref string
remainder
This is where the non-keyword part of the line is returned.
)
True if the line starts with a keyword.

ParseFile

#
Parse a file and return the runtime representation of said file.
public static GH_RuntimeFile ParseFile(
path
Path to file.
)
The runtime representation of the file on the disk.