Skip to content

Using IEnumerable for Option is always 'Required' #510

Closed
@sunssd

Description

@sunssd

[Option('a', "aa", Required = false, Separator = ',')]
public IEnumerable A { get; set; }
[Option('b', "bb", Required = false)]
public string B { get; set; }
[Value(0, Required = true)]
public string C { get; set; }

For some reasons, if I only specify Option A and C, I will get the following error:

ERROR(S):
A required value not bound to option name is missing.
Error setting value to option 'a, aa': Check if Option or Value attribute values are set properly for the given type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions