private AsyncResult.AsyncCompletion GetNextCompletion() { AsyncResult.AsyncCompletion asyncCompletion = this.nextAsyncCompletion; this.transactionContext = null; this.nextAsyncCompletion = null; return(asyncCompletion); }
protected IDisposable PrepareTransactionalCall(Transaction transaction) { object transactionSignalScope; if (this.transactionContext != null && !this.transactionContext.IsPotentiallyAbandoned) { AsyncResult.ThrowInvalidAsyncResult("PrepareTransactionalCall should only be called as the object of non-nested using statements. If the Begin succeeds, Check/SyncContinue must be called before another PrepareTransactionalCall."); } if (transaction == null) { transactionSignalScope = null; } else { transactionSignalScope = new AsyncResult.TransactionSignalScope(this, transaction); } AsyncResult.TransactionSignalScope transactionSignalScope1 = (AsyncResult.TransactionSignalScope)transactionSignalScope; this.transactionContext = (AsyncResult.TransactionSignalScope)transactionSignalScope; return(transactionSignalScope1); }
protected AsyncCallback PrepareAsyncCompletion(AsyncResult.AsyncCompletion callback) { if (this.transactionContext != null) { if (!this.transactionContext.IsPotentiallyAbandoned) { this.transactionContext.Prepared(); } else { this.transactionContext = null; } } this.nextAsyncCompletion = callback; if (AsyncResult.asyncCompletionWrapperCallback == null) { AsyncResult.asyncCompletionWrapperCallback = new AsyncCallback(AsyncResult.AsyncCompletionWrapperCallback); } return(AsyncResult.asyncCompletionWrapperCallback); }