private void Events_TransactionCommit(RemoteDbTransaction connection) { var id = GetOrThrowConnectionId(connection.Connection as RemotingDbConnection); var transaction = TransactionIds.GetOrAdd(connection, f => null); CommitTransaction(id, transaction); }
private string TryGetTransactionId(RemoteDbTransaction connection) { if (connection == null) { return(null); } if (TransactionIds.TryGetValue(connection, out var id)) { return(id); } return(null); }
private void Events_TransactionCreated(RemoteDbTransaction connection) { TransactionIds.TryAdd(connection, RegisterTransaction(GetOrThrowConnectionId(connection.Connection as RemotingDbConnection))); }