Ejemplo n.º 1
0
 public override void Combine(Operator @operator)
 {
     if (@operator == null) throw new ArgumentNullException(nameof(@operator));
     var @logicalJoin = Operators.OfType<LogicalJoin>().FirstOrDefault();
     if (@logicalJoin != null)
     {
         @logicalJoin.Combine(@operator);
     }
     else
     {
         var operators = new List<Operator>();
         operators.AddRange(Operators.Where(@op => !(@op is LogicalJoin)).Take(OperatorCount - 1));
         operators.Add(
             new And(new List<Operator>(Operators.Where(@op => !operators.Contains(@op))) { @operator }.ToArray()));
         InitOperators(operators);
     }
 }
Ejemplo n.º 2
0
 public CamlWhere(Operator op)
     : base(WhereTag)
 {
     if (op == null) throw new ArgumentNullException(nameof(op));
     Operator = op;
 }
Ejemplo n.º 3
0
 protected override void OnParsing(XElement existingWhere)
 {
     Operator = existingWhere.Elements().Select(Operator.GetOperator).FirstOrDefault(op => op != null);
 }
Ejemplo n.º 4
0
 public abstract void Combine(Operator @operator);