public CompositeFieldSelector Add(FieldSelector selector) { CompositeFieldSelector composite = selector as CompositeFieldSelector; if (composite != null) { Selectors.AddRange(composite.Selectors); } else { Selectors.Add(selector); } return(this); }
public static CompositeFieldSelector operator &(FieldSelector left, FieldSelector right) { CompositeFieldSelector leftComposite = left as CompositeFieldSelector; if (leftComposite != null) { return(leftComposite.Add(right)); } CompositeFieldSelector rightComposite = right as CompositeFieldSelector; if (rightComposite != null) { return(rightComposite.Add(left)); } return(new CompositeFieldSelector(left, right)); }