private void CollectStandaloneNode(QConObject conObject) { IndexedLeaf existing = FindLeafOnSameField(conObject); if (existing != null) { CollectImplicitAnd(conObject, existing, new IndexedLeaf(conObject)); } else { _nodes.Add(new IndexedLeaf(conObject)); } }
private IndexedLeaf FindLeafOnSameField(QConObject conObject) { IEnumerator i = _nodes.GetEnumerator(); while (i.MoveNext()) { if (i.Current is IndexedLeaf) { IndexedLeaf leaf = (IndexedLeaf)i.Current; if (conObject.OnSameFieldAs(leaf.Constraint())) { return(leaf); } } } return(null); }