public void AbortRequest()
        {
            IEnlistmentShim enlistmentShim = null;
            IEnlistmentNotificationInternal iEnlistmentNotification = null;
            bool flag = false;

            lock (this)
            {
                if ((this.state == OletxEnlistmentState.Active) || (OletxEnlistmentState.Prepared == this.state))
                {
                    this.state = OletxEnlistmentState.Aborting;
                    iEnlistmentNotification = this.iEnlistmentNotification;
                }
                else
                {
                    if (OletxEnlistmentState.Phase0Preparing == this.state)
                    {
                        this.fabricateRollback = true;
                    }
                    else
                    {
                        flag = true;
                    }
                    enlistmentShim = this.EnlistmentShim;
                }
            }
            if (iEnlistmentNotification != null)
            {
                if (DiagnosticTrace.Verbose)
                {
                    EnlistmentNotificationCallTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), base.InternalTraceIdentifier, NotificationCall.Rollback);
                }
                iEnlistmentNotification.Rollback(this);
            }
            else if (enlistmentShim != null)
            {
                try
                {
                    enlistmentShim.AbortRequestDone();
                }
                catch (COMException exception)
                {
                    if ((System.Transactions.Oletx.NativeMethods.XACT_E_CONNECTION_DOWN != exception.ErrorCode) && (System.Transactions.Oletx.NativeMethods.XACT_E_TMNOTAVAILABLE != exception.ErrorCode))
                    {
                        throw;
                    }
                    flag = true;
                    if (DiagnosticTrace.Verbose)
                    {
                        ExceptionConsumedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), exception);
                    }
                }
                finally
                {
                    if (flag)
                    {
                        this.FinishEnlistment();
                    }
                }
            }
        }