# SiteRule class

Namespace: [Grasshopper2.Data.Rules](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.data.rules.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[DebuggerDisplay("{ToString()}")]
public sealed class SiteRule
```

Represents a rule for matching tree sites.

## Constructors

- [SiteRule](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/ctor.md): Constructs a new rule set for testing data trees.

## Fields

- [AndOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/andoperator.md): (static) Defines the AND operator for rule notation.
- [AnyNumbersSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/anynumberssymbol.md): (static) Defines the 'ANY' operator in rule notation.
- [AnyNumberSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/anynumbersymbol.md): (static) Defines the 'ANY-ONE' operator in rule notation.
- [ItemBrackets](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/itembrackets.md): (static) None item brackets.
- [ItemCloseBracket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/itemclosebracket.md): (static) Defines the closing symbol for item sections.
- [ItemOpenBracket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/itemopenbracket.md): (static) Defines the opening symbol for item sections.
- [LessEqualOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/lessequaloperator.md): (static) Defines the 'LESS-THAN-OR-EQUAL-TO' operator.
- [LessOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/lessoperator.md): (static) Defines the 'LESS-THAN' operator.
- [MoreEqualOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/moreequaloperator.md): (static) Defines the 'GREATER-THAN-OR-EQUAL-TO' operator.
- [MoreOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/moreoperator.md): (static) Defines the 'GREATER-THAN' operator.
- [NotOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/notoperator.md): (static) Defines the NOT operator for rule notation.
- [OrOperator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/oroperator.md): (static) Defines the OR operator for rule notation.
- [PathBrackets](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/pathbrackets.md): (static) None path brackets.
- [PathCloseBracket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/pathclosebracket.md): (static) Defines the closing symbol for path sections.
- [PathOpenBracket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/pathopenbracket.md): (static) Defines the opening symbol for path sections.
- [PathSeparator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/pathseparator.md): (static) Defines the separator for path elements.
- [RangeCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/rangecode.md): (static) Defines the range separator in rule notation. Any rule which contains this string is considered to be a RangeRule.
- [RangeSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/rangesymbol.md): (static) Defines the range separator in rule notation. Any rule which contains this char is considered to be a RangeRule.
- [RuleBrackets](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/rulebrackets.md): (static) None rule brackets.
- [RuleCloseBracket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/ruleclosebracket.md): (static) Defines the opening symbol for rule group notation.
- [RuleOpenBracket](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/ruleopenbracket.md): (static) Defines the opening symbol for rule group notation.
- [Separator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/separator.md): (static) Defines the separator symbol for numeric entries in rule notation.
- [SequenceCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/sequencecode.md): (static) Defines the sequence identifier in rule notation. Any rule which contains this string is considered to be a SequenceRule.
- [SequenceSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/sequencesymbol.md): (static) Defines the sequence identifier in rule notation. Any rule which contains this char is considered to be a SequenceRule.

## Properties

- [HasItemRule](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/hasitemrule.md): Gets whether this type set has a defined integer type.
- [HasPathRules](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/haspathrules.md): Gets whether this type set has any path rules.
- [IsVariableLength](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/isvariablelength.md): Gets whether this rule complex supports variable length paths by virtue of having at least a single '*' wildcard.
- [PathRuleCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/pathrulecount.md): Gets the number of defined path rules.

## Methods

- [IsMatch](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/ismatch.md): (3 overloads) Test the item rule on a single index.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/tostring.md): Returns a properly formatted string describing this ruleset.
- [TryParse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.rules.siterule/tryparse.md): (static) Attempt to parse a Pattern string.
