/// <summary> /// Process asynchronous messages through the sink chain. Mocking can be applied here. /// </summary> public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink) { if (RecorderManager.IsPlaying) { MockableCall call = new MockableCall(null, (IMethodCallMessage)msg); AsyncCallHandler handler = new AsyncCallHandler(replySink, call); RecorderManager.RecordCall(call); } else if (RecorderManager.IsRecording) { } else { return(NextSink.AsyncProcessMessage(msg, replySink)); } return(nextMessageSink.AsyncProcessMessage( msg, new AsyncCallHandler( replySink, new MockableCall(null, (IMethodCallMessage)msg) ) )); }
/// <summary> /// Asynchronously processes the given message. /// </summary> /// <param name="msg">The message to process.</param> /// <param name="replySink">The reply sink for the reply message.</param> /// <returns> /// Returns an <see cref="T:System.Runtime.Remoting.Messaging.IMessageCtrl" /> interface that provides a way to control asynchronous messages after they have been dispatched. /// </returns> public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink) { return(NextSink.AsyncProcessMessage(msg, replySink)); }