-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add helpText to VerbOptionAttribute * Add WriteVerbsUsage and fix error with certain properties * Modify tests * Code Review
- Loading branch information
Showing
5 changed files
with
154 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
using System; | ||
|
||
namespace Unosquare.Swan.Attributes | ||
namespace Unosquare.Swan.Attributes | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Models a verb option | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public sealed class VerbOptionAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="VerbOptionAttribute" /> class. | ||
/// </summary> | ||
/// <param name="name">The name.</param> | ||
/// <exception cref="ArgumentNullException">name</exception> | ||
public VerbOptionAttribute(string name) | ||
{ | ||
Name = name ?? throw new ArgumentNullException(nameof(name)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the name of the verb option. | ||
/// </summary> | ||
/// <value> | ||
/// Name. | ||
/// </value> | ||
public string Name { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets a short description of this command line verb. Usually a sentence summary. | ||
/// </summary> | ||
/// <value> | ||
/// The help text. | ||
/// </value> | ||
public string HelpText { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters