Guest User

Untitled

a guest
Oct 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Mdmeta.Core
  4. {
  5. /// <summary>
  6. /// Specify a property to receive argument of command from the user.
  7. /// </summary>
  8. [AttributeUsage(AttributeTargets.Property)]
  9. public sealed class CommandArgumentAttribute : Attribute
  10. {
  11. /// <summary>
  12. /// Gets the argument name of a command task.
  13. /// </summary>
  14. public string Name { get; }
  15.  
  16. /// <summary>
  17. /// Gets or sets the description of the argument.
  18. /// This will be shown when the user typed --help option.
  19. /// </summary>
  20. public string Description { get; set; }
  21.  
  22. /// <summary>
  23. /// Specify a property to receive argument of command from the user.
  24. /// </summary>
  25. public CommandArgumentAttribute(string argumentName)
  26. {
  27. Name = argumentName;
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment