Skip to content

Bad example or bug in new parser implementation? #179

Answered by atifaziz
Steve-OH asked this question in Q&A
Discussion options

You must be logged in to vote

but there is no public parser variation with a Match method that takes three functions for help, version and usage.

You can find the variation nested under IParser<> in Parser.cs:

TResult Match<TResult>(Func<T, TResult> args,
Func<IHelpResult, TResult> help,
Func<IVersionResult, TResult> version,
Func<IInputErrorResult, TResult> error);

Bear in mind that the Match method changes its arity depending on the API composition. This is pointed out in the API section of the documentation:

The version using Match provides stronger guarantees because the arity of the Match method will change depending …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by atifaziz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #178 on May 31, 2022 06:08.