GH_TreeRules

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

Constructors

GH_TreeRules

#
Constructs a new rule set for testing data trees. Unless you know exactly what you are doing, use the FromString() static method instead.
public GH_TreeRules(
pathRules,
A collection of path rules.
indexRule
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

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

HasPathRules

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

PathRuleCount

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

Methods

Apply

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

Apply

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

FromString

#
Attempt to parse a Pattern string.
public static GH_TreeRules FromString(
text,
String to parse.
ref string
message = 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