예제 #1
0
		private IIndexedNode ResolveFully(IIndexedNode bestIndex)
		{
			if (null == bestIndex)
			{
				return null;
			}
			if (bestIndex.IsResolved())
			{
				return bestIndex;
			}
			return ResolveFully(bestIndex.Resolve());
		}
 private IIndexedNode ResolveFully(IIndexedNode indexedNode)
 {
     if (null == indexedNode)
     {
         return(null);
     }
     if (indexedNode.IsResolved())
     {
         return(indexedNode);
     }
     return(ResolveFully(indexedNode.Resolve()));
 }
예제 #3
0
		private IIndexedNode ResolveFully(IIndexedNode indexedNode)
		{
			if (null == indexedNode)
			{
				return null;
			}
			if (indexedNode.IsResolved())
			{
				return indexedNode;
			}
			return ResolveFully(indexedNode.Resolve());
		}
 private IIndexedNode ResolveFully(IIndexedNode bestIndex)
 {
     if (null == bestIndex)
     {
         return(null);
     }
     if (bestIndex.IsResolved())
     {
         return(bestIndex);
     }
     return(ResolveFully(bestIndex.Resolve()));
 }
예제 #5
0
        public virtual void TestDoubleDescendingOnIndexedNodes()
        {
            IQuery query = CreateComplexItemQuery();

            query.Descend("child").Descend("foo").Constrain(3);
            query.Descend("bar").Constrain(2);
            IIndexedNode index = SelectBestIndex(query);

            AssertComplexItemIndex("foo", index);
            Assert.IsFalse(index.IsResolved());
            IIndexedNode result = index.Resolve();

            Assert.IsNotNull(result);
            AssertComplexItemIndex("child", result);
            Assert.IsTrue(result.IsResolved());
            Assert.IsNull(result.Resolve());
            AssertComplexItems(new int[] { 4 }, result.ToTreeInt());
        }