Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wrong management of sequences and values  #454

Copy link
Copy link
@andrea-narciso

Description

@andrea-narciso
Issue body actions

Consider following definition of options:

    class Options
    {
        [Option('c', "channels", Required = true, Separator = ':', HelpText = "Channel names")]
        public IEnumerable<string> Channels { get; set; }

        [Value(0,
               Required = true,
               MetaName = "file_path",
               HelpText = "Path of archive to be processed")]
        public string ArchivePath { get; set; }
    }

When invoking app.exe -c chanA:chanB file.hdf5 the expected result would be

Channels = {"chanA", "chanB"} 
ArchivePath = "file.hdf5"

Instead, I get a CommandLine.MissingRequiredOptionError

If I remove the Required attribute from the value definition, parsing succeeds but I get:
Channels = {"chanA", "chanB", "file.hdf5"}
And the expected ArchivePath value ends up in the Channels definitions (why? there is no ":" separator)

Am I doing something wrong?

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.