Skip to content

Option constraint to accept only positive integers? #940

Open
@mristin

Description

@mristin

Hi,
First, thanks a lot for all the effort on this library!

Am I correct to assume that currently System.CommandLine does not support constraints on integer options? Is there a convention how to implement such constraints?

I looked int Option{T}.cs and OptionExtensions.cs, but I only see constraints related to strings, files and directories.

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