コード例 #1
0
        private void Events_TransactionCommit(RemoteDbTransaction connection)
        {
            var id          = GetOrThrowConnectionId(connection.Connection as RemotingDbConnection);
            var transaction = TransactionIds.GetOrAdd(connection, f => null);

            CommitTransaction(id, transaction);
        }
コード例 #2
0
        private string TryGetTransactionId(RemoteDbTransaction connection)
        {
            if (connection == null)
            {
                return(null);
            }

            if (TransactionIds.TryGetValue(connection, out var id))
            {
                return(id);
            }

            return(null);
        }
コード例 #3
0
 private void Events_TransactionCreated(RemoteDbTransaction connection)
 {
     TransactionIds.TryAdd(connection, RegisterTransaction(GetOrThrowConnectionId(connection.Connection as RemotingDbConnection)));
 }