예제 #1
0
        private void RequestAccepted(IAsyncResult result)
        {
            IReplyChannel replyChannel = (IReplyChannel)result.AsyncState;

            try
            {
                var requestContext = replyChannel.EndReceiveRequest(result);

                if (requestContext != null)
                {
                    var context = new AzureServiceBusHttpContext(requestContext);

                    context.Items["ReplyChannel"] = replyChannel;

                    ProcessRequest(context);
                }
            }
            catch (Exception exc)
            {
                Manager.Log("Request Accepted: " + exc.Message, "Proxy");
                replyChannel.Abort();
            }
        }
        private void RequestAccepted(IAsyncResult result)
        {
            IReplyChannel replyChannel = (IReplyChannel)result.AsyncState;

            try
            {
                var requestContext = replyChannel.EndReceiveRequest(result);

                if (requestContext != null)
                {
                    var context = new AzureServiceBusHttpContext(requestContext);

                    context.Items["ReplyChannel"] = replyChannel;

                    ProcessRequest(context);
                }
            }
            catch (Exception exc)
            {
                Manager.Log("Request Accepted: " + exc.Message, "Proxy");
                replyChannel.Abort();
            }
        }