Class AggregateBuilder
Builder to compose an aggregate element.
public class AggregateBuilder : RuleElementBuilder
- Inheritance
-
AggregateBuilder
- Inherited Members
Constructors
AggregateBuilder()
Initializes a new instance of the AggregateBuilder.
public AggregateBuilder()
Methods
Aggregator(string, IEnumerable<KeyValuePair<string, LambdaExpression>>, Type?)
Configure a custom aggregator.
public void Aggregator(string name, IEnumerable<KeyValuePair<string, LambdaExpression>> expressions, Type? customFactoryType = null)
Parameters
namestringName of the aggregator.
expressionsIEnumerable<KeyValuePair<string, LambdaExpression>>Named expressions used by the aggregator.
customFactoryTypeTypeThe type of the custom aggregate factory
Collect()
Configure a collection aggregator.
public void Collect()
Flatten(LambdaExpression)
Configure flattening aggregator.
public void Flatten(LambdaExpression selector)
Parameters
selectorLambdaExpressionProjection expression.
GroupBy(LambdaExpression, LambdaExpression)
Configure group by aggregator.
public void GroupBy(LambdaExpression keySelector, LambdaExpression elementSelector)
Parameters
keySelectorLambdaExpressionGrouping key selection expressions.
elementSelectorLambdaExpressionElement selection expression.
OrderBy(LambdaExpression, SortDirection)
Configure Collect() aggregator to order facts by key.
public void OrderBy(LambdaExpression keySelector, SortDirection sortDirection)
Parameters
keySelectorLambdaExpressionKey selection expression.
sortDirectionSortDirectionOrder to sort the aggregation in.
Pattern(PatternBuilder)
Sets a pattern builder as the source of the aggregate element.
public void Pattern(PatternBuilder builder)
Parameters
builderPatternBuilderElement builder to set as the source.
Pattern(Declaration)
Creates a pattern builder that builds the source of the aggregate element.
public PatternBuilder Pattern(Declaration declaration)
Parameters
declarationDeclarationPattern declaration.
Returns
- PatternBuilder
Pattern builder.
Pattern(PatternElement)
Creates a pattern builder that builds the source of the aggregate. Sets a pattern element as the source of the aggregate element.
public void Pattern(PatternElement element)
Parameters
elementPatternElementElement to set as the source.
Pattern(Type, string?)
Creates a pattern builder that builds the source of the aggregate element.
public PatternBuilder Pattern(Type type, string? name = null)
Parameters
Returns
- PatternBuilder
Pattern builder.
Project(LambdaExpression)
Configure projection aggregator.
public void Project(LambdaExpression selector)
Parameters
selectorLambdaExpressionProjection expression.
ResultType(Type)
Sets type of the result produced by the aggregation.
public void ResultType(Type resultType)
Parameters
resultTypeTypeType of the result.
ToLookup(LambdaExpression, LambdaExpression)
Configure Collect() aggregator to arrange facts into a lookup, grouped by key.
public void ToLookup(LambdaExpression keySelector, LambdaExpression elementSelector)
Parameters
keySelectorLambdaExpressionGrouping key selection expressions.
elementSelectorLambdaExpressionElement selection expression.