public Task RollbackAsync(IConnection connection, IBoltProtocol protocol, IBookmarkTracker tracker,
                           out IState nextState)
 {
     nextState = RolledBack;
     return(protocol.RollbackTransactionAsync(connection));
 }
 public Task CommitAsync(IConnection connection, IBoltProtocol protocol, IBookmarkTracker tracker,
                         out IState nextState)
 {
     throw new ClientException("Cannot commit this transaction, because it has already been rolled back.");
 }
 public Task CommitAsync(IConnection connection, IBoltProtocol protocol, IBookmarkTracker tracker,
                         out IState nextState)
 {
     nextState = Committed;
     return(protocol.CommitTransactionAsync(connection, tracker));
 }