4using System.Collections.Generic;
5using System.Threading.Tasks;
9 public static partial class ParserResultExtensions
24 await action(parsed.Value);
43 if (parsed.Value is T value)
61 Func<IEnumerable<Error>, Task> action)
65 await action(notParsed.Errors);
It contains a sequence of CommandLine.Error.
It contains an instance of type T with parsed values.
static async Task< ParserResult< T > > WithNotParsedAsync< T >(this ParserResult< T > result, Func< IEnumerable< Error >, Task > action)
Executes asynchronously action if CommandLine.ParserResult<T> lacks parsed values and contains error...
static async Task< ParserResult< T > > WithParsedAsync< T >(this ParserResult< T > result, Func< T, Task > action)
Executes asynchronously action if CommandLine.ParserResult<T> contains parsed values.
Models a parser result. When inherited by CommandLine.Parsed<T>, it contains an instance of type T w...