示例#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);
        }
        internal Type ResolveType()
        {
            Type newType = 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 startIndex = 0;
                if (string.CompareOrdinal(this.typeName, 0, "clr:", 0, 4) == 0)
                {
                    startIndex = 4;
                }
                int index = this.typeName.IndexOf(',', startIndex);
                if (index == -1)
                {
                    index = this.typeName.Length;
                }
                lastCalledType = this.srvID.ServerType;
                newType        = ResolveTypeRelativeTo(this.typeName, startIndex, index - startIndex, lastCalledType);
            }
            if (newType == null)
            {
                newType = RemotingServices.InternalGetTypeFromQualifiedTypeName(this.typeName);
            }
            if (this.srvID != null)
            {
                this.srvID.SetLastCalledType(this.typeName, newType);
            }
            return(newType);
        }
        // Token: 0x06005A4E RID: 23118 RVA: 0x0013BB58 File Offset: 0x00139D58
        internal Type ResolveType()
        {
            Type type = null;

            if (this.srvID == null)
            {
                this.srvID = (IdentityHolder.CasualResolveIdentity(this.uri) as ServerIdentity);
            }
            if (this.srvID != null)
            {
                Type type2 = this.srvID.GetLastCalledType(this.typeName);
                if (type2 != null)
                {
                    return(type2);
                }
                int num = 0;
                if (string.CompareOrdinal(this.typeName, 0, "clr:", 0, 4) == 0)
                {
                    num = 4;
                }
                int num2 = this.typeName.IndexOf(',', num);
                if (num2 == -1)
                {
                    num2 = this.typeName.Length;
                }
                type2 = this.srvID.ServerType;
                type  = MethodCall.ResolveTypeRelativeTo(this.typeName, num, num2 - num, type2);
            }
            if (type == null)
            {
                type = RemotingServices.InternalGetTypeFromQualifiedTypeName(this.typeName);
            }
            if (this.srvID != null)
            {
                this.srvID.SetLastCalledType(this.typeName, type);
            }
            return(type);
        }