示例#1
0
        private void GetMessage(object sender, ResponseEventArgs e)
        {
            RecieveMessageResponse response = e.Response as RecieveMessageResponse;

            if (response != null)
            {
                if (response.Message != null)
                {
                    GetMessage(response.Name, response.Message);
                }
            }
        }
示例#2
0
        public async Task <SqsMessage[]> ReceiveMessagesAsync(Uri queueUrl, RecieveMessagesRequest request)
        {
            #region Preconditions

            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            #endregion

            var httpRequest = new HttpRequestMessage(HttpMethod.Post, queueUrl)
            {
                Content = GetPostContent(request.ToParams())
            };

            var responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            return(RecieveMessageResponse.Parse(responseText).ToArray());
        }
示例#3
0
 public void RecieveMessage(RecieveMessageResponse response)
 {
     syncContext.Post(new SendOrPostCallback(OnBroadcast <RecieveMessageResponse>), response);
 }