Пример #1
0
            public override string ToString()
            {
                IMethod method = _instance.Type.GetVirtualMethod(_appDomain.ObjectType.GetMethod("ToString", 0));

                if (method == null || method is ILMethod)
                {
                    return(_instance.ToString());
                }
                return(_instance.Type.FullName);
            }
			public override string ToString()
			{
				IMethod m = appdomain.ObjectType.GetMethod("ToString", 0);
				m = instance.Type.GetVirtualMethod(m);
				if (m == null || m is ILMethod)
				{
					return instance.ToString();
				}
				else
					return instance.Type.FullName;
			}
Пример #3
0
            public override string ToString()
            {
                IMethod m = this.mAppDomain.ObjectType.GetMethod("ToString", 0);

                m = __instance.Type.GetVirtualMethod(m);
                if (m == null || m is ILMethod)
                {
                    return(__instance.ToString());
                }
                return(__instance.Type.FullName);
            }
Пример #4
0
            public override string ToString()
            {
                var method = appdomain.ObjectType.GetMethod("ToString", 0);

                method = instance.Type.GetVirtualMethod(method);
                if (method == null || method is ILMethod)
                {
                    return(instance.ToString());
                }
                return(instance.Type.FullName);
            }
Пример #5
0
        public string AdapterToString(IAdapter adapter)
        {
            IMethod        m            = adapter.Appdomain.ObjectType.GetMethod("ToString", 0);
            ILTypeInstance typeInstance = adapter.ILInstance;

            m = typeInstance.Type.GetVirtualMethod(m);
            if (m == null || m is ILMethod)
            {
                return(typeInstance.ToString());
            }
            else
            {
                return(typeInstance.Type.FullName);
            }
        }
Пример #6
0
 public override string ToString()
 {
     if (!isToStringGot)
     {
         isToStringGot = true;
         IMethod m = appdomain.ObjectType.GetMethod("ToString", 0);
         toString = instance.Type.GetVirtualMethod(m);
     }
     if (toString == null || toString is ILMethod)
     {
         return(instance.ToString());
     }
     else
     {
         return(instance.Type.FullName);
     }
 }
Пример #7
0
        //OnMessage自己处理

        public override string ToString()
        {
            if (mToString == null)
            {
                mToString = mAppDomain.ObjectType.GetMethod("ToString", 0);
            }
            IMethod m = mInstance.Type.GetVirtualMethod(mToString);

            if (m == null || m is ILMethod)
            {
                return(mInstance.ToString());
            }
            else
            {
                return(mInstance.Type.FullName);
            }
        }
Пример #8
0
            public override string ToString()
            {
                IMethod m  = appdomain.ObjectType.GetMethod("ToString", 0);
                var     vm = instance.Type.GetVirtualMethod(m);

                if (vm == null || vm is ILMethod)
                {
                    if (!isInvokingToString)
                    {
                        isInvokingToString = true;
                        string res = instance.ToString();
                        isInvokingToString = false;
                        return(res);
                    }
                    else
                    {
                        return(instance.Type.FullName);
                    }
                }
                else
                {
                    return(instance.Type.FullName);
                }
            }