Skip to content

Cannot implement Option because the only constructors are internal #1889

@tom-mckinney

Description

@tom-mckinney

A recent change in 2.0-beta4 removed the public constructors for Option. Because the constructors are declared with internal accessibility, 3rd party libraries and applications can no longer extend the abstract Option class.

The following constructors should be changed to protected accessibility to allow custom extensions of Option:

internal Option(
    string name,
    string? description,
    Argument argument)
    : base(description)
{
    ...
}

internal Option(
    string[] aliases,
    string? description,
    Argument argument)
    : base(description)
{
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions