Пример #1
0
        public IAsyncResult BeginAbandon(BrokeredMessage message, AsyncCallback callback, object state)
        {
            var asyncResult = new AbandonMessageAsyncResult(message, this.tokenProvider);

            asyncResult.BeginInvoke(callback, state);

            return(asyncResult);
        }
Пример #2
0
        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);
        }