2

Resolved

Consider making TraitAttribute non sealed

description

This would allow to create more specific traits that allow to support better consistency in the usage of traits.
For example it would be easy to create a CategoryAttribute that already sets the trait name to "category".
Of course that can already be achieved using the existing "TraitAttribute" class.

But then a team must be very disciplined to ensure consistent trait names throughout a large code base.

comments

BradWilson wrote Mar 15, 2014 at 4:58 PM

While we did not unseal TraitAttribute (it would be impossible to support source-code based discovery for Resharper, among others), we did add support for writing your own attributes which return traits, and shipped this feature in the v2.0 alpha build 2595.