Is there any way to build a group of attributes?
Before:
[SuppressMessage("Microsoft.Design", "CA1061")]
[SuppressMessage("Microsoft.Usage", "CA1812")]
[SuppressMessage("Microsoft.Design", "CA1064")]
public abstract void Foo();
What I want:
[SpecialStuff]
public abstract void Foo();
Is this possible? Can I build an attribute that groups others?
The way attributes and their respective values are examined is usually through reflection - your special aggregate attribute SpecialDispose
would not have any meaning since its unknown to a potential inspector so I do not think its possible to achieve what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With