} // CreateChannelSinks internal static void SetEnvoyAndChannelSinks(Identity idObj, IMessageSink chnlSink, IMessageSink envoySink) { Message.DebugOut("Setting up envoy and channel sinks \n"); BCLDebug.Assert(null != idObj,"null != idObj"); // Decide if we need to set the envoy sink chain if (null == idObj.ChannelSink) { if (null != chnlSink) { idObj.RaceSetChannelSink(chnlSink); } } // Decide if we need to set the envoy sink chain if (null == idObj.EnvoyChain) { if (null != envoySink) { idObj.RaceSetEnvoyChain(envoySink); } else { throw new RemotingException( String.Format( CultureInfo.CurrentCulture, Environment.GetResourceString( "Remoting_BadInternalState_FailEnvoySink"))); } } }
internal static void SetEnvoyAndChannelSinks(Identity idObj, IMessageSink chnlSink, IMessageSink envoySink) { if ((idObj.ChannelSink == null) && (chnlSink != null)) { idObj.RaceSetChannelSink(chnlSink); } if (idObj.EnvoyChain == null) { if (envoySink == null) { throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_BadInternalState_FailEnvoySink"), new object[0])); } idObj.RaceSetEnvoyChain(envoySink); } }