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
name
stringName of the aggregator.
expressions
IEnumerable<KeyValuePair<string, LambdaExpression>>Named expressions used by the aggregator.
customFactoryType
TypeThe 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
selector
LambdaExpressionProjection expression.
GroupBy(LambdaExpression, LambdaExpression)
Configure group by aggregator.
public void GroupBy(LambdaExpression keySelector, LambdaExpression elementSelector)
Parameters
keySelector
LambdaExpressionGrouping key selection expressions.
elementSelector
LambdaExpressionElement selection expression.
OrderBy(LambdaExpression, SortDirection)
Configure Collect() aggregator to order facts by key.
public void OrderBy(LambdaExpression keySelector, SortDirection sortDirection)
Parameters
keySelector
LambdaExpressionKey selection expression.
sortDirection
SortDirectionOrder to sort the aggregation in.
Pattern(PatternBuilder)
Sets a pattern builder as the source of the aggregate element.
public void Pattern(PatternBuilder builder)
Parameters
builder
PatternBuilderElement 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
declaration
DeclarationPattern 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
element
PatternElementElement 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
selector
LambdaExpressionProjection expression.
ResultType(Type)
Sets type of the result produced by the aggregation.
public void ResultType(Type resultType)
Parameters
resultType
TypeType 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
keySelector
LambdaExpressionGrouping key selection expressions.
elementSelector
LambdaExpressionElement selection expression.