Skip to content

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

Closed

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?

Activity

  1. jonsequitur commented on Jul 8, 2025

    @jonsequitur
    Contributor

    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?

    Implicit was recommended during API review over IsImplicit. This is aligned to the .NET naming guidelines though it's more of a suggestion than a rule. https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-type-members#names-of-properties

  2. added this to the Triage milestone on Jul 8, 2025
  3. self-assigned this
    on Jul 9, 2025
  4. modified the milestones: Triage, 2.0.0-beta7 on Jul 9, 2025
  5. added 2 commits that reference this issue on Jul 9, 2025
    f5d3100
    dc41a4a
  6. added a commit that references this issue on Jul 9, 2025
    12473cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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