Two questions about attributes:
- When are attribute classes instantiated? When the type is first accessed, or at the start of execution?
- From within the attribute class, can I find out for which type the attribute was instantiated?
The idea is that I want to make a list of all the classes in my assembly that have my attribute applied to it. I could of course iterate through all of them with reflection and check - but it would be nicer if the attribute could simply append to a global static list upon instantiation.