Exemple #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: boolean consumeResult(MutableTransactionState ctx, org.neo4j.function.ThrowingConsumer<org.neo4j.bolt.runtime.BoltResult,Exception> resultConsumer) throws Exception
            internal bool ConsumeResult(MutableTransactionState ctx, Org.Neo4j.Function.ThrowingConsumer <Org.Neo4j.Bolt.runtime.BoltResult, Exception> resultConsumer)
            {
                bool success = false;

                try
                {
                    resultConsumer.Accept(ctx.CurrentResult);
                    success = true;
                }
                finally
                {
                    ctx.CurrentResult.close();
                    ctx.CurrentResult = null;

                    if (ctx.CurrentResultHandle != null)
                    {
                        ctx.CurrentResultHandle.close(success);
                        ctx.CurrentResultHandle = null;
                    }
                }
                return(success);
            }