If I apply a custom attribute to a class, for example:
[Foo]
class Bar {}
It's clear that when I retrieve my Foo attribute instance, that it's associated with a Bar. Inside the Foo implementation, say in the ctor, how do I get the class associated with the instance of the attribute? So far, all I've been able to come up with is putting it into the ctor of the attribute:
[Foo(typeof(Bar)]
class Bar {}
which seems horribly redundant.