Beispiel #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));
        }
Beispiel #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 }));
        }
Beispiel #3
0
        private ProjectionAggregator <TestFact, string> CreateTarget()
        {
            var expression = new FactExpression <TestFact, string>(x => x.Value);

            return(new ProjectionAggregator <TestFact, string>(expression));
        }
        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));
        }
        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));
        }
        private FlatteningAggregator <TestFact, string> CreateTarget()
        {
            var expression = new FactExpression <TestFact, IEnumerable <string> >(x => x.Values);

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