GH_TreeRules

References
[DebuggerDisplay("{ToString()}")] public sealed class GH_TreeRules
Represents an entire data tree rule set.

Constructors

GH_TreeRules

#
public GH_TreeRules(IEnumerable<IGH_Rule> pathRules, IGH_Rule indexRule)
Constructs a new rule set for testing data trees. Unless you know exactly what you are doing, use the FromString() static method instead.
pathRules (IEnumerable<IGH_Rule>)A collection of path rules.
indexRule (IGH_Rule)Optional index rule (may be null).

Fields

AllowedChars

#
public const string AllowedChars = "0123456789-|~&!,.;?*{}[]()<>="

AndOperator

#
public const char AndOperator = '&'

AnyNumbersSymbol

#
public const char AnyNumbersSymbol = '*'

AnyNumberSymbol

#
public const char AnyNumberSymbol = '?'

ItemBrackets

#
public const string ItemBrackets = "[ ]"

ItemCloseBracket

#
public const char ItemCloseBracket = ']'

ItemOpenBracket

#
public const char ItemOpenBracket = '['

NotOperator

#
public const char NotOperator = '!'

OrOperator

#
public const char OrOperator = '|'

PathBrackets

#
public const string PathBrackets = "{ }"

PathCloseBracket

#
public const char PathCloseBracket = '}'

PathOpenBracket

#
public const char PathOpenBracket = '{'

PathSeparator

#
public const char PathSeparator = ';'

RangeSymbol

#
public const char RangeSymbol = '~'

RuleBrackets

#
public const string RuleBrackets = "( )"

RuleCloseBracket

#
public const char RuleCloseBracket = ')'

RuleOpenBracket

#
public const char RuleOpenBracket = '('

Separator

#
public const char Separator = ','

SequenceCode

#
public const string SequenceCode = "..."

SequenceSymbol

#
public const char SequenceSymbol = '.'

Properties

HasItemRule

#
public bool HasItemRule { get; }
Gets whether this rule set has a defined index rule.

HasPathRules

#
public bool HasPathRules { get; }
Gets whether this rule set has any path rules.

PathRuleCount

#
public int PathRuleCount { get; }
Gets the number of defined path rules.

Methods

Apply

#
public bool Apply(GH_Path path, int index)
Apply all the local rules to a path+index combination.
path (GH_Path)Path to test.
index (int)Index to test.
True if path+index pass all the rule tests.

Apply

#
public bool Apply(GH_Path path)
Apply all the local rules to a path.
path (GH_Path)Path to test.
True if path passes all the rule tests.

FromString

#
public static GH_TreeRules FromString(string text, ref string message = null)
Attempt to parse a Pattern string.
text (string)String to parse.
message (ref string = null)If this function fails, msg will contain a message describing the error.
True on success, false on failure.

ToString

#
public override string ToString()
Object.ToString