Menu

#2 UsageBuilder.AddArgument "optional" param always "Optional"

open
nobody
None
5
2008-08-07
2008-08-07
No

hawkeye.parker@autodesk.com

From docs:

UsageBuilder.AddArgument

public void AddArgument(
string name,
string description,
Type type,
bool optional
);

optional
True if the argument should be marked as optional

To Reproduce:

-Create a UsageBuilder and call the AddArgument method, setting "optional" to false.

-Print usage using usage.ToText, e.g., _usage.ToText(Console.Out, OptStyle.Windows, true);

Expected:

Argument should be "Required".

Actual:

Argument is "Optional". Whether the flag is true or false, the usage output is always "Optional".

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.