Пример #1
0
        public SelectManyLinqExpression(MethodCallExpression node, LinqInitializer init) : base(node, init, ExpressionTypeEx.SelectManyLinq)
        {
            if (node.Arguments.Count == 3)
            {
                var rawResultSelector = GetLambda(node.Arguments[2]);

                ResultSelector = init.Evaluator(Source, rawResultSelector);
            }
        }
Пример #2
0
        protected ConditionLinqExpression(MethodCallExpression node, LinqInitializer init, ExpressionTypeEx type) : base(node, init, type)
        {
            if (node.Arguments.Count > 1)
            {
                var rawPredicate = GetLambda(node.Arguments[1]);

                Predicate = init.Evaluator(Source, rawPredicate);
            }
        }
Пример #3
0
        public OrderByLinqExpression(MethodCallExpression node, SortDirection direction, LinqInitializer init) : base(node, init, ExpressionTypeEx.OrderByLinq)
        {
            var rawSelector = GetLambda(node.Arguments[1]);

            KeySelector = init.Evaluator(Source, rawSelector);

            SortDirection = direction;

            if (node.Arguments.Count == 3)
            {
                Comparer = node.Arguments[2];
            }
        }
Пример #4
0
        protected SelectionLinqExpression(MethodCallExpression node, LinqInitializer init, ExpressionTypeEx type) : base(node, init, type)
        {
            var rawSelector = GetLambda(node.Arguments[1]);

            collectionSelector = init.Evaluator(Source, rawSelector);
        }