public void Commit()
{
CheckForOpenTransaction();
// we have to check for an empty endpoint because we dont have one until our first request
if (Endpoint == null)
{
CleanupAfterClosedTransaction();
return;
}
DoCommit(Endpoint, _client.ExecutionConfiguration, _client.Serializer, CustomHeaders);
CleanupAfterClosedTransaction();
}
public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment) { // we receive a commit message // if we own a local transaction, then commit that transaction if (_transaction != null) { _transaction.Commit(); _transaction = null; singlePhaseEnlistment.Committed(); } else if (_transactionId > 0) { GetResourceManager().CommitTransaction(_transactionId); singlePhaseEnlistment.Committed(); } _enlistedInTransactions.Remove(Transaction.Current); }