SharpCrafters Forum – How to create CustomAttributeDeclaration from Attribute?

SharpCrafters Support Forum

        


How to create CustomAttributeDeclaration from... Expand / Collapse
Author
Message
Posted 7/23/2009 1:27:16 PM


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.
Post #548
Posted 7/23/2009 1:29:30 PM


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 -->.
Post #549
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 9:52pm

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.065. 8 queries. Compression Disabled.