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
element
GroupElementGroup element to match.
and
Action<AndElement>Action to invoke on the element if the element is a AndElement.
or
Action<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
element
RuleElementRule element to match.
pattern
Action<PatternElement>Action to invoke on the element if the element is a PatternElement.
aggregate
Action<AggregateElement>Action to invoke on the element if the element is an AggregateElement.
group
Action<GroupElement>Action to invoke on the element if the element is a GroupElement.
exists
Action<ExistsElement>Action to invoke on the element if the element is an ExistsElement.
not
Action<NotElement>Action to invoke on the element if the element is a NotElement.
forall
Action<ForAllElement>Action to invoke on the element if the element is a ForAllElement.