OptionResulthas an Implicit property:
|
/// <summary> |
|
/// Indicates whether the result was created implicitly and not due to the option being specified on the command line. |
|
/// </summary> |
|
/// <remarks>Implicit results commonly result from options having a default value.</remarks> |
|
public bool Implicit => IdentifierToken is null || IdentifierToken.Implicit; |
Since arguments can also have a DefaultValueFactory like options, it would make sense for ArgumentResult to also have an Implicit property like OptionResult.
Tangent: I don't know about the naming conventions and whether the property name is already locked in, but for a boolean read-only property like that, wouldn't a name like IsImplicit be more suitable?
OptionResulthas anImplicitproperty:command-line-api/src/System.CommandLine/Parsing/OptionResult.cs
Lines 32 to 36 in 7bb08a6
Since arguments can also have a DefaultValueFactory like options, it would make sense for
ArgumentResultto also have anImplicitproperty likeOptionResult.Tangent: I don't know about the naming conventions and whether the property name is already locked in, but for a boolean read-only property like that, wouldn't a name like
IsImplicitbe more suitable?