Пример #1
0
        public IAsyncResult BeginAddMessage(CloudQueueMessage message, AsyncCallback callback, object state)
        {
            CloudQueue        queue   = _queues[GetNextQueue()];
            NestedAsyncHelper wrapper = NestedAsyncHelper.WrapBeginParameters(callback, state, queue);

            return(wrapper.WrapAsyncResult(queue.BeginAddMessage(message, NestedAsyncHelper.Callback, wrapper)));
        }
Пример #2
0
        public IAsyncResult BeginGetMessages(int messageCount, TimeSpan visibilityTimeout, AsyncCallback callback,
                                             object state)
        {
            CloudQueue        queue   = _queues[GetNextQueue()];
            NestedAsyncHelper wrapper = NestedAsyncHelper.WrapBeginParameters(callback, state, queue);

            return
                (wrapper.WrapAsyncResult(queue.BeginGetMessages(messageCount, visibilityTimeout,
                                                                NestedAsyncHelper.Callback, wrapper)));
        }
Пример #3
0
        public IAsyncResult BeginDeleteMessage(CloudQueueMessage message, AsyncCallback callback, object state)
        {
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }

            HSMessageWrapper  msg     = (HSMessageWrapper)message;
            NestedAsyncHelper wrapper = NestedAsyncHelper.WrapBeginParameters(callback, state, msg._origin);

            return(wrapper.WrapAsyncResult(msg._origin.BeginDeleteMessage(msg, NestedAsyncHelper.Callback, wrapper)));
        }