Пример #1
0
 private static bool TryNonExclusiveQueryEnumeratedParent(
     out ELNode foundNode,
     out ELNodeEnumerator enumerator,
     object key,
     LogicVariable v,
     ELNodeEnumerator parentEnumerator)
 {
     // Enumerated parent path
     // NonUniqueParent/Something
     foundNode = null;
     if (v == null)
     {
         // NonUniqueParent/Key
         // Enumerate parent, then do deterministic lookup for child.
         enumerator = new ELNodeEnumeratorFixedChildFromParentEnumerator(parentEnumerator, key);
         return true;
     }
     if (parentEnumerator.BindsVar(v))
     {
         // We're doing a search for a variable that's aready bound.
         enumerator = new ELNodeEnumeratorPreboundVariable(parentEnumerator, v, false);
         return true;
     }
     // NonUniqueParent/Variable
     // Enumerate both parent and child.
     enumerator = new ELNodeEnumeratorLogicVariableFromParentEnumerator(parentEnumerator, v);
     return true;
 }
Пример #2
0
 private static bool TryNonExclusiveQueryEnumeratedParent(
     out ELNode foundNode,
     out ELNodeEnumerator enumerator,
     object key,
     LogicVariable v,
     ELNodeEnumerator parentEnumerator)
 {
     // Enumerated parent path
     // NonUniqueParent/Something
     foundNode = null;
     if (v == null)
     {
         // NonUniqueParent/Key
         // Enumerate parent, then do deterministic lookup for child.
         enumerator = new ELNodeEnumeratorFixedChildFromParentEnumerator(parentEnumerator, key);
         return true;
     }
     if (parentEnumerator.BindsVar(v))
     {
         // We're doing a search for a variable that's aready bound.
         enumerator = new ELNodeEnumeratorPreboundVariable(parentEnumerator, v, false);
         return true;
     }
     // NonUniqueParent/Variable
     // Enumerate both parent and child.
     enumerator = new ELNodeEnumeratorLogicVariableFromParentEnumerator(parentEnumerator, v);
     return true;
 }