Ejemplo n.º 1
0
        internal Type ResolveType()
        {
            Type newType = (Type)null;

            if (this.srvID == null)
            {
                this.srvID = IdentityHolder.CasualResolveIdentity(this.uri) as ServerIdentity;
            }
            if (this.srvID != null)
            {
                Type lastCalledType = this.srvID.GetLastCalledType(this.typeName);
                if (lastCalledType != null)
                {
                    return(lastCalledType);
                }
                int num1 = 0;
                if (string.CompareOrdinal(this.typeName, 0, "clr:", 0, 4) == 0)
                {
                    num1 = 4;
                }
                int num2 = this.typeName.IndexOf(',', num1);
                if (num2 == -1)
                {
                    num2 = this.typeName.Length;
                }
                Type serverType = this.srvID.ServerType;
                newType = Type.ResolveTypeRelativeTo(this.typeName, num1, num2 - num1, serverType);
            }
            if (newType == null)
            {
                newType = RemotingServices.InternalGetTypeFromQualifiedTypeName(this.typeName);
            }
            if (this.srvID != null)
            {
                this.srvID.SetLastCalledType(this.typeName, newType);
            }
            return(newType);
        }
Ejemplo n.º 2
0
 internal MethodCall(object handlerObject, BinaryMethodCallMessage smuggledMsg)
 {
     if (handlerObject != null)
     {
         this.uri = handlerObject as string;
         if (this.uri == null && handlerObject is MarshalByRefObject marshalByRefObject2)
         {
             this.srvID = MarshalByRefObject.GetIdentity(marshalByRefObject2, out bool _) 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)
     {
         return;
     }
     smuggledMsg.PopulateMessageProperties(this.Properties);
 }