Esempio n. 1
0
        private void CollectStandaloneNode(QConObject conObject)
        {
            IndexedLeaf existing = FindLeafOnSameField(conObject);

            if (existing != null)
            {
                CollectImplicitAnd(conObject, existing, new IndexedLeaf(conObject));
            }
            else
            {
                _nodes.Add(new IndexedLeaf(conObject));
            }
        }
Esempio n. 2
0
        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);
        }