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); } }
public CamlWhere(Operator op) : base(WhereTag) { if (op == null) throw new ArgumentNullException(nameof(op)); Operator = op; }
protected override void OnParsing(XElement existingWhere) { Operator = existingWhere.Elements().Select(Operator.GetOperator).FirstOrDefault(op => op != null); }
public abstract void Combine(Operator @operator);