Beispiel #1
0
        private CORINFO_CLASS_STRUCT_* getArgClass(IntPtr _this, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args)
        {
            int index = (int)args;
            Object sigObj = HandleToObject((IntPtr)sig->pSig);

            MethodSignature methodSig = sigObj as MethodSignature;
            if (methodSig != null)
            {
                TypeDesc type = methodSig[index];
                return ObjectToHandle(type);
            }
            else
            {
                LocalVariableDefinition[] locals = (LocalVariableDefinition[])sigObj;
                TypeDesc type = locals[index].Type;
                return ObjectToHandle(type);
            }
        }
Beispiel #2
0
 private CORINFO_ARG_LIST_STRUCT_* getArgNext(IntPtr _this, CORINFO_ARG_LIST_STRUCT_* args)
 {
     return (CORINFO_ARG_LIST_STRUCT_*)((int)args + 1);
 }
Beispiel #3
0
        private CorInfoTypeWithMod getArgType(IntPtr _this, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args, ref CORINFO_CLASS_STRUCT_* vcTypeRet)
        {
            int index = (int)args;
            Object sigObj = HandleToObject((IntPtr)sig->pSig);

            MethodSignature methodSig = sigObj as MethodSignature;

            if (methodSig != null)
            {
                TypeDesc type = methodSig[index];

                CorInfoType corInfoType = asCorInfoType(type, out vcTypeRet);
                return (CorInfoTypeWithMod)corInfoType;
            }
            else
            {
                LocalVariableDefinition[] locals = (LocalVariableDefinition[])sigObj;
                TypeDesc type = locals[index].Type;

                CorInfoType corInfoType = asCorInfoType(type, out vcTypeRet);

                return (CorInfoTypeWithMod)corInfoType | (locals[index].IsPinned ? CorInfoTypeWithMod.CORINFO_TYPE_MOD_PINNED : 0);
            }
        }
Beispiel #4
0
        public virtual CORINFO_CLASS_STRUCT_* getArgClass_wrapper(IntPtr _this, out IntPtr exception, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args)
        {
            exception = IntPtr.Zero;
            try
            {
                return getArgClass(sig, args);

            }
            catch (Exception ex)
            {
                exception = AllocException(ex);
            }
            return (CORINFO_CLASS_STRUCT_*)0;
        }
Beispiel #5
0
        public virtual CorInfoTypeWithMod getArgType_wrapper(IntPtr _this, out IntPtr exception, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args, ref CORINFO_CLASS_STRUCT_* vcTypeRet)
        {
            exception = IntPtr.Zero;
            try
            {
                return getArgType(sig, args, ref vcTypeRet);

            }
            catch (Exception ex)
            {
                exception = AllocException(ex);
            }
            return (CorInfoTypeWithMod)0;
        }
Beispiel #6
0
        public virtual CORINFO_ARG_LIST_STRUCT_* getArgNext_wrapper(IntPtr _this, out IntPtr exception, CORINFO_ARG_LIST_STRUCT_* args)
        {
            exception = IntPtr.Zero;
            try
            {
                return getArgNext(args);

            }
            catch (Exception ex)
            {
                exception = AllocException(ex);
            }
            return (CORINFO_ARG_LIST_STRUCT_*)0;
        }
Beispiel #7
0
 static CORINFO_CLASS_STRUCT_* _getArgClass(IntPtr thisHandle, IntPtr* ppException, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args)
 {
     var _this = GetThis(thisHandle);
     try
     {
         return _this.getArgClass(sig, args);
     }
     catch (Exception ex)
     {
         *ppException = _this.AllocException(ex);
         return default(CORINFO_CLASS_STRUCT_*);
     }
 }
Beispiel #8
0
 static CorInfoTypeWithMod _getArgType(IntPtr thisHandle, IntPtr* ppException, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args, ref CORINFO_CLASS_STRUCT_* vcTypeRet)
 {
     var _this = GetThis(thisHandle);
     try
     {
         return _this.getArgType(sig, args, ref vcTypeRet);
     }
     catch (Exception ex)
     {
         *ppException = _this.AllocException(ex);
         return default(CorInfoTypeWithMod);
     }
 }