question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Has the approach to verbs in v2 changed?

See original GitHub issue

Issue by ravensorb Thursday Nov 02, 2017 at 18:53 GMT _Originally opened as https://github.com/gsscoder/commandline/issues/500_


I was reviewing the code and the following wiki for vers https://github.com/gsscoder/commandline/wiki/Latest-Version and I cannot see how they line up.

Ex - the following will not compile

var result = CommandLine.Parser.Default.ParseArguments<AddOptions, UpdateOptions, DeleteOptions(args).MapResult(
    (AddOptions aopts) => {},
    (UpdateOptions upopts) => {},
    (DeleteOptions dopts) => {});

It complains that there is no support for more than one Generic and from looking at the code, I didn’t see any overrides or extensions to ParseArguments that supports multiple generics. So I was curious if the approach had changed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ericnewton76commented, Nov 4, 2017

Comment by ravensorb Thursday Nov 02, 2017 at 20:10 GMT


That helped – I found the issue 😃 It appears you must add the using statement

using CommnadLine;

Without that it doesn’t find the extension methods or the Error option.

0reactions
mhmd-azeezcommented, Aug 2, 2018

@ericnewton76 Wouldn’t it be better to mention the need to add using CommnadLine; in the README.md example as well? Or at least write Parser.Default.ParseArguments instead of CommandLine.Parser.Default.ParseArguments to force the programmer to add a using statement.

Because it’s not obvious from the example that these are extension methods and can produce frustrating compilation errors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

V2 word order
In syntax, verb-second (V2) word order is a sentence structure in which the finite verb of a sentence or a clause is placed...
Read more >
Approach V1 V2 V3 V4 V5, Past Simple and Past Participle ...
Verbs in a regular structure can be transformed with a simple rule, whereas in irregular verbs, this situation is slightly different.
Read more >
Verbs: More than Just Action Words! | Part 3: Changes in ...
A verb is any word that can change its form based on three conditions: ... Once the verb 'eat' moves to position 2...
Read more >
Verbs followed by '-ing' or infinitive to change meaning
Some verbs have a different meaning depending on whether they are followed by an -ing form or to + infinitive. stop. Stop +...
Read more >
Verb Tenses - Grammar - Academic Guides - Walden University
Keep in mind that verb tenses should be adjusted after the proposal after the research has been completed. See this blog post about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found