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

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

TagBeginner

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

TagCategory

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

TagComponent

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

TagContact

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

TagDescription

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

TagErranyms

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

TagExpert

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

TagInclude

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

TagIntermediate

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

TagKeywords

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

TagPronunciation

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

TagRhinoCommand

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

TagSeeAlso

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

TagSynonyms

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

TagTitle

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

Properties

Keys

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

Path

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

Tags

#
public static IEnumerable<string> Tags { get; }
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.

Indexers

Content

#
public List<string[]> this[string key] { get; }
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.
key (string)Key to search for, key comparison is not case-sensitive.

Methods

ContainsKey

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

IsTag

#
public static bool IsTag(string text)
Tests whether a string is a predefined Grasshopper Help keyword.
text (string)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

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

ParseFile

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