Maddus Mattus wrote:
So basically only when it's added value and when there is no other solution.
I wouldn't say that so much, that makes it sound like the attributes system was a disaster..
In your example, you use the attributes to extend the properties of the data, where as really this just makes it harder for accessors to get full context of the data they work with..
Attributes on members really should describe something thats abstract to the type of data that member is, serialization for example: you wouldn't want every member to have to state its serialization intent, so instead- you use attributes as 'stand off' data..
The argument I guess you could say more is, should the functionality this attribute gives, be generically part of all target members, or should it be stood off from the member?
Extending to this, you attribute example describes more the data of the property, vs describing the property itself.. where as the attributes should describe the member (not to say that the attribute shouldn't effect how the members data could be used).