System.Runtime.Remoting.RemotingServices.SetEnvoyAndChannelSinks C# (CSharp) Method

SetEnvoyAndChannelSinks() static private method

static private SetEnvoyAndChannelSinks ( Identity idObj, IMessageSink chnlSink, IMessageSink envoySink ) : void
idObj Identity
chnlSink IMessageSink
envoySink IMessageSink
return void
        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")));
                }
            }
        }
        
RemotingServices