internal MethodCall(object handlerObject, BinaryMethodCallMessage smuggledMsg)
 {
     if (handlerObject != null)
     {
         this.uri = handlerObject as string;
         if (this.uri == null)
         {
             MarshalByRefObject obj2 = handlerObject as MarshalByRefObject;
             if (obj2 != null)
             {
                 bool flag;
                 this.srvID = MarshalByRefObject.GetIdentity(obj2, out flag) as ServerIdentity;
                 this.uri   = this.srvID.URI;
             }
         }
     }
     this.typeName        = smuggledMsg.TypeName;
     this.methodName      = smuggledMsg.MethodName;
     this.methodSignature = (Type[])smuggledMsg.MethodSignature;
     this.args            = smuggledMsg.Args;
     this.instArgs        = smuggledMsg.InstantiationArgs;
     this.callContext     = smuggledMsg.LogicalCallContext;
     this.ResolveMethod();
     if (smuggledMsg.HasProperties)
     {
         smuggledMsg.PopulateMessageProperties(this.Properties);
     }
 }
Ejemplo n.º 2
0
        internal MethodCall(Object handlerObject, BinaryMethodCallMessage smuggledMsg)
        {
            if (handlerObject != null)
            {
                _uri = handlerObject as String;
                if (_uri == null)
                {
                    // This must be the tranparent proxy
                    MarshalByRefObject mbr = handlerObject as MarshalByRefObject;
                    if (mbr != null)
                    {
                        throw new NotImplementedException("MarshalByRefObject.GetIdentity");

/*
 *                      bool fServer;
 *                      srvID = MarshalByRefObject.GetIdentity(mbr, out fServer) as ServerIdentity;
 *                      uri = srvID.URI;
 */
                    }
                }
            }

            _typeName         = smuggledMsg.TypeName;
            _methodName       = smuggledMsg.MethodName;
            _methodSignature  = (Type[])smuggledMsg.MethodSignature;
            _args             = smuggledMsg.Args;
            _genericArguments = smuggledMsg.InstantiationArgs;
            _callContext      = smuggledMsg.LogicalCallContext;

            ResolveMethod();

            if (smuggledMsg.HasProperties)
            {
                smuggledMsg.PopulateMessageProperties(Properties);
            }
        }
Ejemplo n.º 3
0
        [System.Security.SecurityCritical]  // auto-generated 
        internal MethodCall(Object handlerObject, BinaryMethodCallMessage smuggledMsg)
        {
            if (handlerObject != null)
            { 
                uri = handlerObject as String;
                if (uri == null) 
                { 
                    // This must be the tranparent proxy
                    MarshalByRefObject mbr = handlerObject as MarshalByRefObject; 
                    if (mbr != null)
                    {
                        bool fServer;
                        srvID = MarshalByRefObject.GetIdentity(mbr, out fServer) as ServerIdentity; 
                        uri = srvID.URI;
                    } 
                } 
            }
 
            typeName = smuggledMsg.TypeName;
            methodName = smuggledMsg.MethodName;
            methodSignature = (Type[])smuggledMsg.MethodSignature;
            args = smuggledMsg.Args; 
            instArgs = smuggledMsg.InstantiationArgs;
            callContext = smuggledMsg.LogicalCallContext; 
 
            ResolveMethod();
 
            if (smuggledMsg.HasProperties)
                smuggledMsg.PopulateMessageProperties(Properties);
        }