Exemplo n.º 1
0
        private GroupByAggregator <TestFact, GroupKey, GroupElement> CreateTarget()
        {
            var keyExpression     = new FactExpression <TestFact, GroupKey>(x => new GroupKey(x));
            var elementExpression = new FactExpression <TestFact, GroupElement>(x => new GroupElement(x));

            return(new GroupByAggregator <TestFact, GroupKey, GroupElement>(keyExpression, elementExpression));
        }
Exemplo n.º 2
0
        private static MultiKeySortedAggregator <TestFact> CreateTarget_SortWithInt1AndString(SortDirection sortDirectionInt, SortDirection sortDirectionString)
        {
            var expressionInt    = new FactExpression <TestFact, int>(x => x.Int1);
            var expressionString = new FactExpression <TestFact, string>(x => x.String);
            var sortCondition1   = new SortCondition(AggregateElement.KeySelectorAscendingName, sortDirectionInt, expressionInt);
            var sortCondition2   = new SortCondition(AggregateElement.KeySelectorAscendingName, sortDirectionString, expressionString);

            return(new MultiKeySortedAggregator <TestFact>(new[] { sortCondition1, sortCondition2 }));
        }
Exemplo n.º 3
0
        private ProjectionAggregator <TestFact, string> CreateTarget()
        {
            var expression = new FactExpression <TestFact, string>(x => x.Value);

            return(new ProjectionAggregator <TestFact, string>(expression));
        }
Exemplo n.º 4
0
        private static SortedAggregator <TestFact, string> CreateTarget_SortByValue(SortDirection sortDirection = SortDirection.Ascending)
        {
            var expression = new FactExpression <TestFact, string>(x => x.Value);

            return(new SortedAggregator <TestFact, string>(expression, sortDirection));
        }
Exemplo n.º 5
0
        private static SortedAggregator <TestFact, int> CreateTarget(SortDirection sortDirection = SortDirection.Ascending)
        {
            var expression = new FactExpression <TestFact, int>(x => x.Id);

            return(new SortedAggregator <TestFact, int>(expression, sortDirection));
        }
Exemplo n.º 6
0
        private FlatteningAggregator <TestFact, string> CreateTarget()
        {
            var expression = new FactExpression <TestFact, IEnumerable <string> >(x => x.Values);

            return(new FlatteningAggregator <TestFact, string>(expression));
        }