Replies: 2 comments
-
By the way, the attribute class is sealed, otherwise I would have extend it. Not sure if there is any specific reason for this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Example from LinqPad
Outputs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Allow the following use of the TaskNameAttribute:
[TaskName(typeof(PushLibraryPackageTask))]
Then convert the Type.Name to a human readable string like "Push Library Package". I assume the most common naming convention for the Task classes is pascal cased and possibly ending with "Task".
This makes for a better development experience when you rename your class in an IDE, since otherwise you always have to remember to change the hardcoded string in the attribute.
Maybe this is considered trivial but I think it would be a nice to have feature. I guess the main problem would be to handle different naming conventions, it is possible that somebody would name there class something like "push_library_package_task" or what ever, but it could be made clear via XML comment/documentation which conventions are supported (otherwise people can default to the string constructor).
Beta Was this translation helpful? Give feedback.
All reactions