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