Table of Contents

Class PatternBuilder

Namespace
NRules.RuleModel.Builders
Assembly
NRules.RuleModel.dll

Builder to compose a rule pattern.

public class PatternBuilder : RuleElementBuilder
Inheritance
PatternBuilder
Inherited Members

Constructors

PatternBuilder(Declaration)

Initializes a new instance of the PatternBuilder.

public PatternBuilder(Declaration declaration)

Parameters

declaration Declaration

Pattern declaration.

PatternBuilder(Type, string?)

Initializes a new instance of the PatternBuilder.

public PatternBuilder(Type type, string? name)

Parameters

type Type

Pattern type.

name string

Pattern name.

Properties

Declaration

Pattern declaration.

public Declaration Declaration { get; }

Property Value

Declaration

Methods

Aggregate()

Creates an aggregate builder that builds the source of the pattern element.

public AggregateBuilder Aggregate()

Returns

AggregateBuilder

Aggregate builder.

Aggregate(AggregateElement)

Sets an aggregate element as the source of the pattern element.

public void Aggregate(AggregateElement element)

Parameters

element AggregateElement

Element to set as the source.

Aggregate(AggregateBuilder)

Sets an aggregate builder as the source of the pattern element.

public void Aggregate(AggregateBuilder builder)

Parameters

builder AggregateBuilder

Element builder to set as the source.

Binding()

Creates a binding builder that builds the source of the pattern element.

public BindingBuilder Binding()

Returns

BindingBuilder

Binding builder.

Binding(BindingElement)

Sets a binding element as the source of the pattern element.

public void Binding(BindingElement element)

Parameters

element BindingElement

Element to set as the source.

Binding(BindingBuilder)

Sets a binding builder as the source of the pattern element.

public void Binding(BindingBuilder builder)

Parameters

builder BindingBuilder

Element builder to set as the source.

Condition(LambdaExpression)

Adds a condition expression to the pattern element.

public void Condition(LambdaExpression expression)

Parameters

expression LambdaExpression

Condition expression. Names and types of the expression parameters must match the names and types defined in the pattern declarations.