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))); }
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))); }
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))); }