コード例 #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
ファイル: MessageReceiver.cs プロジェクト: zhy29563/MyMEF
        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);
        }