Skip to content

Support for Uri #210

Closed
Closed
@mac2000

Description

@mac2000

Here is what I trying to do:

class Options {
    [Option('e', "Endpoint", HelpText = "[uri] Endpoint, e.g.: http://localhost:9200")]
    public Uri Endpoint { get; set; }
}

class Program {
    static void Main(string[] args) {
        Parser.Default.ParseArguments<Options>(args).WithParsed(Run);
    }

    static void Run(Options options) {
        Console.WriteLine("Endpoint: {0}", options.Endpoint);
    }
}

but unfortunately no matter how I call executable there is always error saying that Option 'Endpoint, e' is defined with a bad format.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions