Is there any metadata reader compatible with reflection?

41 views Asked by At

I want to get the declarative security attributes from an assembly. For now i just go through all the types in assembly and all of their members to look for custom attributes that derive from CodeAccessSecurityAttribute. This works kinda fine, but i think the better way is to read the DeclSecurity metadata table and get the attributes from there. But the problem is that all the cool reflection metadata things are on different net platforms, i need something for .NET Framework 4.8. I know there is dnlib but it uses its own classes for everything so using it together with reflection will be hard to say the least

0

There are 0 answers