System.Transactions.SinglePhaseEnlistment.Aborted C# (CSharp) Method

Aborted() public method

public Aborted ( ) : void
return void
        public void Aborted()
        {
            TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
            if (etwLog.IsEnabled())
            {
                etwLog.MethodEnter(TraceSourceType.TraceSourceLtm, this);
                etwLog.EnlistmentAborted(_internalEnlistment);
            }

            lock (_internalEnlistment.SyncRoot)
            {
                _internalEnlistment.State.Aborted(_internalEnlistment, null);
            }

            if (etwLog.IsEnabled())
            {
                etwLog.MethodExit(TraceSourceType.TraceSourceLtm, this);
            }
        }

Same methods

SinglePhaseEnlistment::Aborted ( Exception e ) : void
SinglePhaseEnlistment::Aborted ( System e ) : void

Usage Example

 public void Rollback(SinglePhaseEnlistment en)
 {
     if (en == null)
     {
         throw new ArgumentNullException("en");
     }
     try
     {
         this.handle.WaitOne();
     }
     catch (ObjectDisposedException)
     {
     }
     lock (this.syncRoot)
     {
         if (this.transaction != null)
         {
             this.transaction.Dispose();
         }
         if ((this.connection != null) && (this.connection.State != ConnectionState.Closed))
         {
             this.connection.Close();
             this.connection = null;
         }
         en.Aborted();
     }
 }
All Usage Examples Of System.Transactions.SinglePhaseEnlistment::Aborted