Hi, I'm doing some stuff with the Reflection-Only context at the moment and I'm running into a bit of trouble with discovering security-related attributes defined on a member. I can use CustomAttributeData.GetCustomAttributes to find most things, but I since SecurityAttribute classes are just pseudo-custom-attributes, they don't show up.
Is there any other way to detect these

Is it possible to discover SecurityAttributes in the Reflection Only context?
Christina Tabet
Unfortunately the current reflection object model does not expose the security attributes (either in the Reflection-Only or standard contexts). You've pointed out the reason -- security attributes are not real custom attributes, in that they have their own metadata table and are stored seperately from the custom attributes that reflection exposes. You can use PermCalc in v2.0 and PermView in v1.x to display this information on the command line, but there is no supported way to access it directly.
-Shawn
Amjath
I actually can get the security attributes and other pseudo-attributes in the standard context -- looking in Reflector, CustomAttribute.GetCustomAttributes merges theses with the real ones -- but I'll hopefully find a way to work around this in the reflection only context.
cheers
Michael