Support for System.ComponentModel.DataAnnotations.DisplayAttribute
0x15e opened this issue · 0 comments
0x15e commented
The included DescriptionAttribute is nice and simple but it would be nice to be able to put my command descriptions in resources and potentially translate them.
I've just done some (albeit very quick) checking and the System.ComponentModel.Annotations nuget package seems to support all the platforms oakton targets and that should make it possible to set the description on a command with a line like the following:
_commandType.ForAttribute<DisplayAttribute>(att => { _description = att.GetDescription(); });
Did you have specific reasons for not doing this in the first place or has it just not been needed yet? Would you be interested in a PR if I implemented it?