Esempio n. 1
0
        void InitInterfaceImpls_NoLock()
        {
            var  mdi   = readerModule.MetaDataImport;
            uint token = OriginalToken.Raw;

            interfaces?.Clear();

            var itemTokens = MDAPI.GetInterfaceImplTokens(mdi, token);

            interfaces = new LazyList <InterfaceImpl, uint[]>(itemTokens.Length, itemTokens, (itemTokens2, index) => readerModule.ResolveInterfaceImpl(itemTokens2[index], new GenericParamContext(this)));
        }
Esempio n. 2
0
        DmdType[] ReadDeclaredInterfacesCore_COMThread(IList <DmdType> genericTypeArguments)
        {
            reader.Dispatcher.VerifyAccess();
            var tokens = MDAPI.GetInterfaceImplTokens(reader.MetaDataImport, (uint)MetadataToken);

            if (tokens.Length == 0)
            {
                return(null);
            }
            var res = new DmdType[tokens.Length];

            for (int i = 0; i < res.Length; i++)
            {
                uint token      = tokens[i];
                uint ifaceToken = MDAPI.GetInterfaceImplInterfaceToken(reader.MetaDataImport, token);
                res[i] = reader.ResolveType((int)ifaceToken, genericTypeArguments, null, DmdResolveOptions.ThrowOnError);
            }
            return(res);
        }