Example #1
0
        public EventAttributes GetAttributes()
        {
            var mod = Module;
            var mdi = mod == null ? null : mod.GetMetaDataInterface <IMetaDataImport>();

            return(MDAPI.GetEventAttributes(mdi, Token));
        }
Example #2
0
        void InitNameAndAttrs_NoLock()
        {
            var  mdi   = readerModule.MetaDataImport;
            uint token = OriginalToken.Raw;

            Name       = Utils.GetUTF8String(MDAPI.GetUtf8Name(mdi, OriginalToken.Raw), MDAPI.GetEventName(mdi, token) ?? string.Empty);
            Attributes = MDAPI.GetEventAttributes(mdi, token);
            uint eventType = MDAPI.GetEventTypeToken(mdi, token);

            EventType = readerModule.ResolveTypeDefOrRefInternal(eventType, new GenericParamContext(ownerType));
        }
Example #3
0
        public DmdEventDefCOMD(DmdComMetadataReader reader, uint rid, DmdType declaringType, DmdType reflectedType) : base(rid, declaringType, reflectedType)
        {
            this.reader = reader ?? throw new ArgumentNullException(nameof(reader));
            reader.Dispatcher.VerifyAccess();
            uint token = 0x14000000 + rid;

            Name       = MDAPI.GetEventName(reader.MetaDataImport, token) ?? string.Empty;
            Attributes = MDAPI.GetEventAttributes(reader.MetaDataImport, token);
            var eventTypeToken = MDAPI.GetEventTypeToken(reader.MetaDataImport, token);

            EventHandlerType = reader.ResolveType((int)eventTypeToken, DeclaringType !.GetGenericArguments(), null, DmdResolveOptions.None) ?? reader.Module.AppDomain.System_Void;
        }
Example #4
0
 public EventAttributes GetAttributes() => MDAPI.GetEventAttributes(Module?.GetMetaDataInterface <IMetaDataImport>(), Token);