Skip to content

Enumerable of Enum doesn't work if followed by Values #617

Closed
@usr-sse2

Description

@usr-sse2

I have such options:

[Option("fm",  Separator=',', Default = new[] { FMode.S })]  
public IEnumerable<FMode> Mode { get; set; }
	 
[Option('q')]
public bool q { get;set; }
	 
[Value(0)]
public IList<string> Files { get; set; }

If I run my application with --fm D,C a.txt arguments, it says that option 'fm' is defined with a bad format. If I put any option between 'fm' and the value list, for example, --fm D,C -q a.txt, it is parsed successfully. You can check it in a fiddle: https://dotnetfiddle.net/yt5L9K

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