Shaolinq.TransactionContext.SinglePhaseCommit C# (CSharp) Method

SinglePhaseCommit() public method

public SinglePhaseCommit ( SinglePhaseEnlistment singlePhaseEnlistment ) : void
singlePhaseEnlistment System.Transactions.SinglePhaseEnlistment
return void
		public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
		{
			if (this.disposed)
			{
				return;
			}

			try
			{
				if (this.dataAccessObjectDataContext != null)
				{
					this.commandsContext = this.GetSqlTransactionalCommandsContext();

					this.dataAccessObjectDataContext.Commit(this.commandsContext, false);
					this.commandsContext.Commit();
				}

				singlePhaseEnlistment.Committed();
			}
			catch (Exception e)
			{
				ActionUtils.IgnoreExceptions(() => this.commandsContext.Rollback());

				singlePhaseEnlistment.Aborted(e);
			}
			finally
			{
				this.Dispose();
			}
		}