Exemple #1
0
 /// <summary>
 /// Returns a multi-directed resource iterator given the provided node cursor, direction and relationship types.
 /// </summary>
 /// <param name="cursors"> A cursor factor used for allocating the needed cursors </param>
 /// <param name="node"> A node cursor positioned at the current node. </param>
 /// <param name="types"> The types of the relationship </param>
 /// <param name="factory"> factory for creating instance of generic type T </param>
 /// <returns> An iterator that allows traversing the relationship chain. </returns>
 public static ResourceIterator <T> AllIterator <T>(CursorFactory cursors, NodeCursor node, int[] types, RelationshipFactory <T> factory)
 {
     if (node.Dense)
     {
         RelationshipDenseSelectionIterator <T> selectionIterator = new RelationshipDenseSelectionIterator <T>(factory);
         SetupAllDense(selectionIterator, cursors, node, types);
         return(selectionIterator);
     }
     else
     {
         RelationshipSparseSelectionIterator <T> selectionIterator = new RelationshipSparseSelectionIterator <T>(factory);
         SetupAllSparse(selectionIterator, cursors, node, types);
         return(selectionIterator);
     }
 }
 internal override void AssertEmpty(RelationshipDenseSelectionIterator <R> iterator)
 {
     AssertEmpty((ResourceIterator <R>)iterator);
 }
 internal override void AssertLoop(RelationshipDenseSelectionIterator <R> iterator, int type)
 {
     AssertLoop((ResourceIterator <R>)iterator, type);
 }
 internal override void AssertIncoming(RelationshipDenseSelectionIterator <R> iterator, int sourceNode, int type)
 {
     AssertIncoming((ResourceIterator <R>)iterator, sourceNode, type);
 }
 internal override void AssertOutgoing(RelationshipDenseSelectionIterator <R> iterator, int targetNode, int type)
 {
     AssertOutgoing((ResourceIterator <R>)iterator, targetNode, type);
 }