Skip to content

Commit 3a9d4dd

Browse files
database64128jonsequitur
authored andcommitted
🔖 Add missing description to Argument<T>'s ctor
1 parent d4d31f7 commit 3a9d4dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/System.CommandLine/Argument{T}.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ public Argument(Func<T> getDefaultValue) : this()
7272
/// <param name="name">The name of the argument.</param>
7373
/// <param name="parse">A custom argument parser.</param>
7474
/// <param name="isDefault"><c>true</c> to use the <paramref name="parse"/> result as default value.</param>
75+
/// <param name="description">The description of the argument, shown in help.</param>
7576
/// <exception cref="ArgumentNullException">Thrown when <paramref name="parse"/> is null.</exception>
7677
public Argument(
7778
string? name,
7879
ParseArgument<T> parse,
79-
bool isDefault = false) : this()
80+
bool isDefault = false,
81+
string? description = null) : this()
8082
{
8183
if (!string.IsNullOrWhiteSpace(name))
8284
{
@@ -108,6 +110,8 @@ public Argument(
108110
return false;
109111
}
110112
};
113+
114+
Description = description;
111115
}
112116

113117
/// <summary>

0 commit comments

Comments
 (0)