Skip to content

[API proposal] "Implicit" property for ArgumentResult just like OptionResult has #2622

@elgonzo

Description

@elgonzo

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?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions