Esempio n. 1
0
        private static void SetupAllDense(RelationshipDenseSelection denseSelection, CursorFactory cursors, NodeCursor node, int[] types)
        {
            RelationshipGroupCursor     groupCursor     = cursors.AllocateRelationshipGroupCursor();
            RelationshipTraversalCursor traversalCursor = cursors.AllocateRelationshipTraversalCursor();

            try
            {
                node.Relationships(groupCursor);
                denseSelection.All(groupCursor, traversalCursor, types);
            }
            catch (Exception t)
            {
                groupCursor.close();
                traversalCursor.close();
                throw t;
            }
        }
Esempio n. 2
0
        public virtual void Close()
        {
            Exception closeGroupError = null;

            try
            {
                if (_groupCursor != null)
                {
                    _groupCursor.close();
                }
            }
            catch (Exception t)
            {
                closeGroupError = t;
            }

            try
            {
                if (RelationshipCursor != null)
                {
                    RelationshipCursor.close();
                }
            }
            catch (Exception t)
            {
                if (closeGroupError != null)
                {
                    t.addSuppressed(closeGroupError);
                }
                throw t;
            }
            finally
            {
                RelationshipCursor = null;
                _groupCursor       = null;
            }
        }