Ejemplo n.º 1
0
        internal static IEnvoyInfo CreateEnvoyInfo(ServerIdentity serverID)
        {
            IEnvoyInfo info = null;

            if (null != serverID)
            {
                // Set the envoy sink chain
                if (serverID.EnvoyChain == null)
                {
                    serverID.RaceSetEnvoyChain(
                        serverID.ServerContext.CreateEnvoyChain(
                            serverID.TPOrObject));
                }

                // Create an envoy info object only if necessary
                IMessageSink sink = serverID.EnvoyChain as EnvoyTerminatorSink;
                if (null == sink)
                {
                    // The chain consists of more than a terminator sink
                    // Go ahead and create an envoy info structure, otherwise
                    // a null is returned and we recreate the terminator sink
                    // on the other side, automatically.
                    info = new EnvoyInfo(serverID.EnvoyChain);
                }
            }

            return(info);
        }
Ejemplo n.º 2
0
        internal static IEnvoyInfo CreateEnvoyInfo(ServerIdentity serverID)
        {
            IEnvoyInfo result = null;

            if (serverID != null)
            {
                if (serverID.EnvoyChain == null)
                {
                    serverID.RaceSetEnvoyChain(serverID.ServerContext.CreateEnvoyChain(serverID.TPOrObject));
                }
                if (!(serverID.EnvoyChain is EnvoyTerminatorSink))
                {
                    result = new EnvoyInfo(serverID.EnvoyChain);
                }
            }
            return(result);
        }
Ejemplo n.º 3
0
        internal static IEnvoyInfo CreateEnvoyInfo(ServerIdentity serverID)
        {
            IEnvoyInfo envoyInfo = (IEnvoyInfo)null;

            if (serverID != null)
            {
                if (serverID.EnvoyChain == null)
                {
                    ServerIdentity serverIdentity = serverID;
                    IMessageSink   envoyChain     = serverIdentity.ServerContext.CreateEnvoyChain(serverID.TPOrObject);
                    serverIdentity.RaceSetEnvoyChain(envoyChain);
                }
                if ((IMessageSink)(serverID.EnvoyChain as EnvoyTerminatorSink) == null)
                {
                    envoyInfo = (IEnvoyInfo) new EnvoyInfo(serverID.EnvoyChain);
                }
            }
            return(envoyInfo);
        }
Ejemplo n.º 4
0
        internal static IEnvoyInfo CreateEnvoyInfo(ServerIdentity serverID)
        {
            IEnvoyInfo info = null;
            if (null != serverID)
            {
                // Set the envoy sink chain
                if (serverID.EnvoyChain == null)
                {
                    serverID.RaceSetEnvoyChain(
                        serverID.ServerContext.CreateEnvoyChain(
                            serverID.TPOrObject));
                }

                // Create an envoy info object only if necessary
                IMessageSink sink = serverID.EnvoyChain as EnvoyTerminatorSink;
                if(null == sink)
                {
                    // The chain consists of more than a terminator sink
                    // Go ahead and create an envoy info structure, otherwise
                    // a null is returned and we recreate the terminator sink
                    // on the other side, automatically.
                    info = new EnvoyInfo(serverID.EnvoyChain);
                }
            }

            return info;
        }