Esempio n. 1
0
        protected LogicalJoin(string operatorName, LogicalJoin firstLogicalJoin, LogicalJoin secondLogicalJoin, IEnumerable <Operator> operators)
            : base(operatorName)
        {
            var allOperators = new List <Operator>()
            {
                firstLogicalJoin, secondLogicalJoin
            };

            if (operators != null)
            {
                allOperators.AddRange(operators);
            }
            InitOperators(allOperators);
        }
Esempio n. 2
0
        protected LogicalJoin(string operatorName, LogicalJoin logicalJoin, ComparisonOperator comparisonOperator, IEnumerable <Operator> operators)
            : base(operatorName)
        {
            var allOperators = new List <Operator>()
            {
                logicalJoin, comparisonOperator
            };

            if (operators != null)
            {
                allOperators.AddRange(operators);
            }
            InitOperators(allOperators);
        }
Esempio n. 3
0
        internal LogicalJoin CombineAnd(params Operator[] combinedOperator)
        {
            if (combinedOperator == null)
            {
                throw new ArgumentNullException("combinedOperator");
            }
            var childOperator = Operators.OfType <LogicalJoin>()
                                .FirstOrDefaultFromMany(op => op.Operators.OfType <LogicalJoin>(),
                                                        op => !op.Operators.OfType <LogicalJoin>().Any());

            LogicalJoin @operator = childOperator ?? this;
            var         operators = new List <Operator>
            {
                @operator.Operators.First(),
                new And(new List <Operator> {
                    @operator.Operators.Last()
                }.Union(combinedOperator))
            };

            @operator.InitOperators(operators);
            return(this);
        }
Esempio n. 4
0
 public And(LogicalJoin firstLogicalJoin, LogicalJoin secondLogicalJoin, params Operator[] operators)
     : base(AndTag, firstLogicalJoin, secondLogicalJoin, operators)
 {
 }
Esempio n. 5
0
 public And(LogicalJoin logicalJoin, ComparisonOperator comparisonOperator, params Operator[] operators)
     : base(AndTag, logicalJoin, comparisonOperator, operators)
 {
 }
Esempio n. 6
0
 public Or(ComparisonOperator comparisonOperator, LogicalJoin logicalJoin, params Operator[] operators)
     : base(OrTag, comparisonOperator, logicalJoin, operators)
 {
 }