Class RuleBuilder
Builder to compose a rule definition. Contains methods to specify rule's metadata, as well as create child builders for rule's left-hand side and right-hand side. Creates IRuleDefinition.
public class RuleBuilder
- Inheritance
-
RuleBuilder
- Inherited Members
Constructors
RuleBuilder()
Constructs an empty rule builder.
public RuleBuilder()
Methods
Build()
Creates rule definition using current state of the builder.
public IRuleDefinition Build()
Returns
- IRuleDefinition
Rule definition.
Dependencies()
Retrieves dependencies builder.
public DependencyGroupBuilder Dependencies()
Returns
- DependencyGroupBuilder
Dependencies builder.
Dependencies(DependencyGroupBuilder)
Sets dependencies builder.
public void Dependencies(DependencyGroupBuilder builder)
Parameters
builder
DependencyGroupBuilderBuilder to set.
Description(string)
Sets rule's description.
public void Description(string description)
Parameters
description
stringRule description value.
Filters()
Retrieves filters builder.
public FilterGroupBuilder Filters()
Returns
- FilterGroupBuilder
Filters builder.
Filters(FilterGroupBuilder)
Sets filters builder.
public void Filters(FilterGroupBuilder builder)
Parameters
builder
FilterGroupBuilderBuilder to set.
LeftHandSide()
Retrieves left-hand side builder (conditions).
public GroupBuilder LeftHandSide()
Returns
- GroupBuilder
Left hand side builder.
LeftHandSide(GroupBuilder)
Sets left-hand side builder (conditions).
public void LeftHandSide(GroupBuilder builder)
Parameters
builder
GroupBuilderBuilder to set.
Name(string)
Sets rule's name.
public void Name(string name)
Parameters
name
stringRule name value.
Priority(int)
Sets rule's priority. Default priority is 0.
public void Priority(int priority)
Parameters
priority
intRule priority value.
Properties(IEnumerable<RuleProperty>)
Adds rule's properties.
public void Properties(IEnumerable<RuleProperty> properties)
Parameters
properties
IEnumerable<RuleProperty>Rule property.
Property(string, object)
Adds rule's property.
public void Property(string name, object value)
Parameters
Repeatability(RuleRepeatability)
Sets rule's repeatability. Default repeatability is Repeatable.
public void Repeatability(RuleRepeatability repeatability)
Parameters
repeatability
RuleRepeatability
RightHandSide()
Retrieves right-hand side builder (actions).
public ActionGroupBuilder RightHandSide()
Returns
- ActionGroupBuilder
Right hand side builder.
RightHandSide(ActionGroupBuilder)
Sets right-hand side builder.
public void RightHandSide(ActionGroupBuilder builder)
Parameters
builder
ActionGroupBuilderBuilder to set.
Tag(string)
Adds rule's tag.
public void Tag(string tag)
Parameters
tag
stringRule tag value.
Tags(IEnumerable<string>)
Adds rule's tags.
public void Tags(IEnumerable<string> tags)
Parameters
tags
IEnumerable<string>Rule tag values.