Skip to content

M_CommandLine_ParserResultExtensions_WithNotParsed__1

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

ParserResultExtensions.WithNotParsed(T) Method

Executes action if ParserResult(T) lacks parsed values and contains errors.

Namespace: CommandLine
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public static ParserResult<T> WithNotParsed<T>(
	this ParserResult<T> result,
	Action<IEnumerable<Error>> action
)

VB

<ExtensionAttribute>
Public Shared Function WithNotParsed(Of T) ( 
	result As ParserResult(Of T),
	action As Action(Of IEnumerable(Of Error))
) As ParserResult(Of T)

C++

public:
[ExtensionAttribute]
generic<typename T>
static ParserResult<T>^ WithNotParsed(
	ParserResult<T>^ result, 
	Action<IEnumerable<Error^>^>^ action
)

F#

[<ExtensionAttribute>]
static member WithNotParsed : 
        result : ParserResult<'T> * 
        action : Action<IEnumerable<Error>> -> ParserResult<'T> 

Parameters

 

result
Type: CommandLine.ParserResult(T)
An ParserResult(T) instance.
action
Type: System.Action(IEnumerable(Error))
The Action delegate to execute.

Type Parameters

 

T
Type of the target instance built with parsed value.

Return Value

Type: ParserResult(T)
The same result instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ParserResult(T). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ParserResultExtensions Class
CommandLine Namespace

Clone this wiki locally