public IAsyncResult BeginAbandon(BrokeredMessage message, AsyncCallback callback, object state) { var asyncResult = new AbandonMessageAsyncResult(message, this.tokenProvider); asyncResult.BeginInvoke(callback, state); return(asyncResult); }
public IAsyncResult BeginAbandon(BrokeredMessage message, AsyncCallback callback, object state) { if (this.ReceiveMode == ReceiveMode.ReceiveAndDelete) { throw new InvalidOperationException("Only a Receiver in PeekLock mode can be used to Abandon messages."); } var asyncResult = new AbandonMessageAsyncResult(message, this.TokenProvider); asyncResult.BeginInvoke(callback, state); return(asyncResult); }