Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public static uint TinyCLRTokenFromTypeDefToken(uint token)
 {
     Debug.Assert((token & (uint)CorTokenType.mdtTypeDef) != 0);
     return(TinyCLR_TypeSystem.CLR_TkFromType(CLR_TABLESENUM.TBL_TypeDef, token & 0x00ffffff));
 }