예제 #1
0
        /// <summary>
        /// Processes the given method call message synchronously.
        /// </summary>
        private void InternalProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, out IMessage replyMsg, out ITransportHeaders responseHeaders, out Stream responseStream)
        {
            // add message Uri to the transport headers
            var mcm = (IMethodCallMessage)msg;

            requestHeaders[CommonTransportKeys.RequestUri] = mcm.Uri;
            requestHeaders["__CustomErrorsEnabled"]        = CustomErrorsEnabled.Value;

            // create the request message
            var requestMessage = new NullMessages.RequestMessage
            {
                Message        = msg,
                RequestHeaders = requestHeaders,
                RequestStream  = requestStream
            };

            // process the request and receive the response message
            var responseMessage = NullMessages.ProcessRequest(ChannelName, requestMessage);

            // return processed message parts
            responseHeaders = responseMessage.ResponseHeaders;
            responseStream  = responseMessage.ResponseStream;
            replyMsg        = responseMessage.Message;
        }
예제 #2
0
		/// <summary>
		/// Processes the given method call message synchronously.
		/// </summary>
		private void InternalProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, out IMessage replyMsg, out ITransportHeaders responseHeaders, out Stream responseStream)
		{
			// add message Uri to the transport headers
			var mcm = (IMethodCallMessage)msg;
			requestHeaders[CommonTransportKeys.RequestUri] = mcm.Uri;
			requestHeaders["__CustomErrorsEnabled"] = CustomErrorsEnabled.Value;

			// create the request message
			var requestMessage = new NullMessages.RequestMessage
			{
				Message = msg,
				RequestHeaders = requestHeaders,
				RequestStream = requestStream
			};

			// process the request and receive the response message
			var responseMessage = NullMessages.ProcessRequest(ChannelName, requestMessage);

			// return processed message parts
			responseHeaders = responseMessage.ResponseHeaders;
			responseStream = responseMessage.ResponseStream;
			replyMsg = responseMessage.Message;
		}