SetLogicalCallContext() private method

private SetLogicalCallContext ( LogicalCallContext callCtx ) : LogicalCallContext
callCtx LogicalCallContext
return LogicalCallContext
        internal override void SetSpecialKey(int keyNum, object value)
        {
            Message    message    = this._mcmsg as Message;
            MethodCall methodCall = this._mcmsg as MethodCall;

            if (keyNum != 0)
            {
                if (keyNum != 1)
                {
                    throw new RemotingException(Environment.GetResourceString("Remoting_Default"));
                }
                if (message != null)
                {
                    message.SetLogicalCallContext((LogicalCallContext)value);
                    return;
                }
                throw new RemotingException(Environment.GetResourceString("Remoting_Message_BadType"));
            }
            else
            {
                if (message != null)
                {
                    message.Uri = (string)value;
                    return;
                }
                if (methodCall != null)
                {
                    methodCall.Uri = (string)value;
                    return;
                }
                throw new RemotingException(Environment.GetResourceString("Remoting_Message_BadType"));
            }
        }
        internal override void SetSpecialKey(int keyNum, object value)
        {
            Message    message = this._mcmsg as Message;
            MethodCall call    = this._mcmsg as MethodCall;

            switch (keyNum)
            {
            case 0:
                if (message == null)
                {
                    if (call == null)
                    {
                        throw new RemotingException(Environment.GetResourceString("Remoting_Message_BadType"));
                    }
                    call.Uri = (string)value;
                    return;
                }
                message.Uri = (string)value;
                return;

            case 1:
                if (message == null)
                {
                    throw new RemotingException(Environment.GetResourceString("Remoting_Message_BadType"));
                }
                message.SetLogicalCallContext((LogicalCallContext)value);
                return;
            }
            throw new RemotingException(Environment.GetResourceString("Remoting_Default"));
        }