Class RuleElementExtensions
public static class RuleElementExtensions
- Inheritance
-
RuleElementExtensions
- Inherited Members
Methods
Match(GroupElement, Action<AndElement>, Action<OrElement>)
Matches a group element to an appropriate action based on the concrete type of the element. Type-safe implementation of discriminated union for group elements.
public static void Match(this GroupElement element, Action<AndElement> and, Action<OrElement> or)
Parameters
elementGroupElementGroup element to match.
andAction<AndElement>Action to invoke on the element if the element is a AndElement.
orAction<OrElement>Action to invoke on the element if the element is a OrElement.
Match(RuleElement, Action<PatternElement>, Action<AggregateElement>, Action<GroupElement>, Action<ExistsElement>, Action<NotElement>, Action<ForAllElement>)
Matches a rule element to an appropriate action based on the concrete type of the element. Type-safe implementation of discriminated union for rule elements.
public static void Match(this RuleElement element, Action<PatternElement> pattern, Action<AggregateElement> aggregate, Action<GroupElement> group, Action<ExistsElement> exists, Action<NotElement> not, Action<ForAllElement> forall)
Parameters
elementRuleElementRule element to match.
patternAction<PatternElement>Action to invoke on the element if the element is a PatternElement.
aggregateAction<AggregateElement>Action to invoke on the element if the element is an AggregateElement.
groupAction<GroupElement>Action to invoke on the element if the element is a GroupElement.
existsAction<ExistsElement>Action to invoke on the element if the element is an ExistsElement.
notAction<NotElement>Action to invoke on the element if the element is a NotElement.
forallAction<ForAllElement>Action to invoke on the element if the element is a ForAllElement.