Beispiel #1
0
        private static uint TinyCLRTokenFromIndex(TinyCLR_TypeSystem.CLR_TABLESENUM tbl, uint index)
        {
            uint idxAssembly = TinyCLR_TypeSystem.IdxAssemblyFromIndex(index);
            uint idxMethod   = TinyCLR_TypeSystem.IdxFromIndex(index);

            return(TinyCLR_TypeSystem.CLR_TkFromType(tbl, idxMethod));
        }
Beispiel #2
0
        public static CorDebugClass CorDebugClassFromTypeIndex(uint typeIndex, CorDebugAppDomain appDomain)
        {
            CorDebugClass cls = null;

            CorDebugAssembly assembly = appDomain.AssemblyFromIdx(TinyCLR_TypeSystem.IdxAssemblyFromIndex(typeIndex));

            if (assembly != null)
            {
                uint typedef = TinyCLR_TypeSystem.CLR_TkFromType(TinyCLR_TypeSystem.CLR_TABLESENUM.TBL_TypeDef, TinyCLR_TypeSystem.IdxFromIndex(typeIndex));
                cls = assembly.GetClassFromTokenTinyCLR(typedef);
            }

            return(cls);
        }