private Stream <ActiveLocksResult> GetActiveLocksForQuery(Pair <KernelTransactionHandle, ExecutingQuery> pair) { ExecutingQuery query = pair.Other(); if (IsAdminOrSelf(query.Username())) { //JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter: return(pair.First().activeLocks().map(ActiveLocksResult::new)); } else { throw new AuthorizationViolationException(PERMISSION_DENIED); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private QueryTerminationResult killQueryTransaction(org.neo4j.helpers.collection.Pair<org.neo4j.kernel.api.KernelTransactionHandle, org.neo4j.kernel.api.query.ExecutingQuery> pair) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException private QueryTerminationResult KillQueryTransaction(Pair <KernelTransactionHandle, ExecutingQuery> pair) { ExecutingQuery query = pair.Other(); if (IsAdminOrSelf(query.Username())) { pair.First().markForTermination(Org.Neo4j.Kernel.Api.Exceptions.Status_Transaction.Terminated); return(new QueryTerminationResult(ofInternalId(query.InternalQueryId()), query.Username())); } else { throw new AuthorizationViolationException(PERMISSION_DENIED); } }