当前位置: 首页>>代码示例>>C#>>正文


C# IServerResponseChannelSinkStack.AsyncProcessResponse方法代码示例

本文整理汇总了C#中IServerResponseChannelSinkStack.AsyncProcessResponse方法的典型用法代码示例。如果您正苦于以下问题:C# IServerResponseChannelSinkStack.AsyncProcessResponse方法的具体用法?C# IServerResponseChannelSinkStack.AsyncProcessResponse怎么用?C# IServerResponseChannelSinkStack.AsyncProcessResponse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IServerResponseChannelSinkStack的用法示例。


在下文中一共展示了IServerResponseChannelSinkStack.AsyncProcessResponse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AsyncProcessResponse

		/// <summary></summary>
		public void AsyncProcessResponse(
			IServerResponseChannelSinkStack sinkStack,
			Object state,
			IMessage message,
			ITransportHeaders headers,
			Stream stream)
		{
			SetClientIpAddressDataHelper(headers);
			sinkStack.AsyncProcessResponse(message, headers, stream);
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:11,代码来源:ClientIPServerSink.cs

示例2: AsyncProcessResponse

 public void AsyncProcessResponse(
     IServerResponseChannelSinkStack sinkStack,
     object state,
     IMessage msg,
     ITransportHeaders headers,
     Stream stream)
 {
     // Send the response to the client.
     sinkStack.AsyncProcessResponse(msg, headers, stream);
 }
开发者ID:yallie,项目名称:zyan,代码行数:10,代码来源:CompressionServerChannelSink.cs

示例3: AsyncProcessResponse

 public void AsyncProcessResponse(
         IServerResponseChannelSinkStack sinkStack,
         Object state,
         IMessage message,
         ITransportHeaders headers,
         Stream stream)
 {
     IPAddress ip = headers[CommonTransportKeys.IPAddress] as IPAddress;
         CallContext.SetData("ClientIPAddress", ip);
         sinkStack.AsyncProcessResponse(message, headers, stream);
 }
开发者ID:jsvgoncalves,项目名称:tdin-chat-server,代码行数:11,代码来源:ClientIPServerSinkProvider.cs

示例4: AsyncProcessResponse

        public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers, Stream stream)
        {
            ClientState cs = state as ClientState;
            if (cs != null && cs.clientCompressed) {
                // compress the shits
                stream = CompressionHelper.CompressStream(stream);
                headers[CompressionHelper.CompressKey] = CompressionHelper.CompressedFlag;
            }

            sinkStack.AsyncProcessResponse(msg, headers, stream);
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:11,代码来源:CompressedServerChannelSink.cs

示例5: AsyncProcessResponse

		public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, object state,
						  IMessage message, ITransportHeaders headers, Stream stream)
		{
			ITransportHeaders responseHeaders = new TransportHeaders();

			if (sinkStack != null) stream = sinkStack.GetResponseStream (message, responseHeaders);
			if (stream == null) stream = new MemoryStream();

			_binaryCore.Serializer.Serialize (stream, message, null);
			if (stream is MemoryStream) stream.Position = 0;

			sinkStack.AsyncProcessResponse (message, responseHeaders, stream);
		}
开发者ID:Jakosa,项目名称:MonoLibraries,代码行数:13,代码来源:UnixBinaryServerFormatterSink.cs

示例6: AsyncProcessResponse

		public void AsyncProcessResponse(
			IServerResponseChannelSinkStack sinkStack_in,
			object state_in,
			IMessage message_in,
			ITransportHeaders headers_in,
			Stream stream_in
		) {
			CallContext.SetData(
				"ClientIPAddress", 
				((IPAddress)headers_in[CommonTransportKeys.IPAddress]).ToString()
			);

			sinkStack_in.AsyncProcessResponse(
				message_in, 
				headers_in, 
				stream_in
			);
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:18,代码来源:ClientIPAddressServerSink.cs

示例7: AsyncProcessResponse

        public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage responseMsg, ITransportHeaders responseHeaders, Stream responseStream)
        {
            // parameters validation
            if (sinkStack == null)
                throw new ArgumentNullException("sinkStack");
            if (responseHeaders == null)
                throw new ArgumentNullException("responseHeaders");
            if (responseStream == null)
                throw new ArgumentNullException("responseStream");

            var methodReturn = responseMsg as IMethodReturnMessage;
            if (methodReturn == null)
                throw new NotSupportedException();

            // serialize response
            _formatter.SerializeResponse(methodReturn, responseHeaders, responseStream);

            // process response asynchronously
            sinkStack.AsyncProcessResponse(responseMsg, responseHeaders, responseStream);
        }
开发者ID:vadimskipin,项目名称:DVRemoting,代码行数:20,代码来源:ServerFormatterSink.cs

示例8: AsyncProcessResponse

 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage message, ITransportHeaders headers, Stream stream)
 {
     object obj1 = headers["__IPAddress"];
     sinkStack.AsyncProcessResponse(message, headers, stream);
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:5,代码来源:ClientIPServerSink.cs

示例9: AsyncProcessResponse

		public void AsyncProcessResponse(
			IServerResponseChannelSinkStack sinkStack_in, 
			object state_in,
			IMessage message_in, 
			ITransportHeaders headers_in, 
			Stream stream_in
		) {
#if DEBUG
			Console.WriteLine("compression sink: AsyncProcessResponse...");
#endif
			bool _hasBeenCompressed = (bool)state_in;

			if (_hasBeenCompressed) {
				#region compress...
				headers_in[CompressionHelper.X_COMPRESS] = "1";

				stream_in = CompressionHelper.GetCompressedStreamCopy(
					stream_in
				); 
				#endregion
			} else {
				if (this.mustdo_) {
					throw new Exception("\n\n\t\tyour activity is being logged!\n\n\t\tun-compressed communications not allowed!\n\n");
				}
			}

			sinkStack_in.AsyncProcessResponse(
				message_in,
				headers_in, 
				stream_in
			);
		} 
开发者ID:katshann,项目名称:ogen,代码行数:32,代码来源:CompressionServerSink.cs

示例10: AsyncProcessResponse

 //---------------------- Implement IServerChannelSink -------------------//
 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, System.Runtime.Remoting.Messaging.IMessage msg, ITransportHeaders headers, System.IO.Stream stream)
 {
     IPAddress ip = headers[CommonTransportKeys.IPAddress] as IPAddress;
     CallContext.SetData("ClientIpAddress", ip);
     sinkStack.AsyncProcessResponse(msg, headers, stream);
 }
开发者ID:thangnt93,项目名称:bkhn-it4882-fish,代码行数:7,代码来源:ClientIpServerSink.cs

示例11: AsyncProcessResponse

		public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, object state,
						  IMessage msg, ITransportHeaders headers, Stream stream)
						  
		{
			ITransportHeaders responseHeaders = new TransportHeaders();

			if(sinkStack != null) stream = sinkStack.GetResponseStream(msg, responseHeaders);
			if(stream == null) stream = new MemoryStream();

			SoapMessageFormatter soapMsgFormatter = (SoapMessageFormatter)state;

			SoapMessage soapMessage = (SoapMessage) soapMsgFormatter.BuildSoapMessageFromMethodResponse((IMethodReturnMessage)msg, out responseHeaders);

			_soapCore.Serializer.Serialize(stream, soapMessage, null);

			if(stream is MemoryStream) stream.Position = 0;
			sinkStack.AsyncProcessResponse (msg, responseHeaders, stream);
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:18,代码来源:SoapServerFormatterSink.cs

示例12: AsyncProcessResponse

 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, 
     IMessage msg, ITransportHeaders headers, Stream stream)
 {
     // перенаправляем вызов следующему приемнику в цепи
     sinkStack.AsyncProcessResponse(msg, headers, stream);
 }
开发者ID:Dennis-Petrov,项目名称:Cash,代码行数:6,代码来源:IpFixServerChannelSink.cs

示例13: AsyncProcessResponse

 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state,
                                  IMessage msg, ITransportHeaders headers, Stream stream) {
     // headers, stream are null, because formatting is first sink to create these two
     AsyncServerProcessingData asyncData = (AsyncServerProcessingData) state;
     try {
         IMessage requestMsg = asyncData.RequestMsg;
         SerialiseResponse(sinkStack, requestMsg, asyncData.ServerCon, msg,
                           ref headers, out stream);
     }
     catch (Exception e) {
         if (asyncData.RequestMsg is IMethodCallMessage) {
             msg = new ReturnMessage(e, (IMethodCallMessage) asyncData.RequestMsg);
         } else {
             msg = new ReturnMessage(e, null); // no useful information present for requestMsg
         }
         // serialise the exception
         SerialiseExceptionResponse(sinkStack, (IMessage)state, asyncData.ServerCon, msg,
                                    ref headers, out stream);
     }
     sinkStack.AsyncProcessResponse(msg, headers, stream); // pass further on to the stream handling sinks
 }
开发者ID:JnS-Software-LLC,项目名称:iiop-net,代码行数:21,代码来源:IIOPFormatter.cs

示例14: AsyncProcessResponse

		public void AsyncProcessResponse(
			IServerResponseChannelSinkStack sinkStack_in, 
			object state_in,
			IMessage message_in, 
			ITransportHeaders headers_in, 
			Stream stream_in
		) {
#if DEBUG
			Console.WriteLine("encryption sink: AsyncProcessResponse");
#endif

			bool _hasBeenEncrypted 
				= (state_in != null) 
					? ((StateStruct)state_in).isEncripted
					: false
				;

			if (_hasBeenEncrypted) {
				#region encrypt...
				headers_in[EncryptionHelper.X_ENCRYPT] = "1";
				stream_in
					= EncryptionHelper.Encrypt(
						stream_in,
						true,
						keyspath_,
						((StateStruct)state_in).ClientID
					); 
				#endregion
			} else {
				if (mustdo_) {
					throw new Exception("\n\n\t\tyour activity is being logged!\n\n\t\tun-encrypted communications not allowed!\n\n");
				}
			}

			sinkStack_in.AsyncProcessResponse(
				message_in,
				headers_in, 
				stream_in
			);
		} 
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:40,代码来源:EncryptionServerSink.cs

示例15: AsyncProcessResponse

 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage message, ITransportHeaders headers, Stream stream)
 {
     stream = Zip.Compress(stream);
     sinkStack.AsyncProcessResponse(message, headers, stream);
 }
开发者ID:bmadarasz,项目名称:ndihelpdesk,代码行数:5,代码来源:ZipServerSink.cs


注:本文中的IServerResponseChannelSinkStack.AsyncProcessResponse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。