|
|
|
Community Member
|
|
Hello. I have a PostSharp class level attribute, which aggregates an instance of some custom attribute inside. I wish to apply this custom attribute automatically to certain methods in the type. How can I create a CustomAttributeDeclaration instance from the given System.Attribute instance? Thanks.
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
You cannot. You need to know which constructor has been used (or CustomAttributeData).
See the thread <!-- l --><a class="postlink-local" href="http://www.postsharp.org/forum/application-proposal/metadata-attribute-injection-t414.html">application-proposal/metadata-attribute-injection-t414.html</a><!-- l -->.
|
|
|
|