Exemple #1
0
        public IAsyncResult BeginComplete(BrokeredMessage message, AsyncCallback callback, object state)
        {
            var asyncResult = new CompleteMessageAsyncResult(message, this.tokenProvider);

            asyncResult.BeginInvoke(callback, state);

            return(asyncResult);
        }
Exemple #2
0
        public IAsyncResult BeginComplete(BrokeredMessage message, AsyncCallback callback, object state)
        {
            if (this.ReceiveMode == ReceiveMode.ReceiveAndDelete)
            {
                throw new InvalidOperationException("Only a Receiver in PeekLock mode can be used to Complete messages.");
            }

            var asyncResult = new CompleteMessageAsyncResult(message, this.TokenProvider);

            asyncResult.BeginInvoke(callback, state);

            return(asyncResult);
        }