اقرأ باللغة الإنجليزية تحرير

مشاركة عبر


SymbolResult.FindResultFor Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

FindResultFor(Argument)

Finds a result for the specific argument anywhere in the parse tree, including parent and child symbol results.

FindResultFor(Command)

Finds a result for the specific command anywhere in the parse tree, including parent and child symbol results.

FindResultFor(Option)

Finds a result for the specific option anywhere in the parse tree, including parent and child symbol results.

FindResultFor(Argument)

Source:
SymbolResult.cs

Finds a result for the specific argument anywhere in the parse tree, including parent and child symbol results.

C#
public virtual System.CommandLine.Parsing.ArgumentResult? FindResultFor(System.CommandLine.Argument argument);

Parameters

argument
Argument

The argument for which to find a result.

Returns

An argument result if the argument was matched by the parser or has a default value; otherwise, null.

Applies to

System.CommandLine 2.0
منتج الإصدارات
System.CommandLine 2.0

FindResultFor(Command)

Source:
SymbolResult.cs

Finds a result for the specific command anywhere in the parse tree, including parent and child symbol results.

C#
public virtual System.CommandLine.Parsing.CommandResult? FindResultFor(System.CommandLine.Command command);

Parameters

command
Command

The command for which to find a result.

Returns

An command result if the command was matched by the parser; otherwise, null.

Applies to

System.CommandLine 2.0
منتج الإصدارات
System.CommandLine 2.0

FindResultFor(Option)

Source:
SymbolResult.cs

Finds a result for the specific option anywhere in the parse tree, including parent and child symbol results.

C#
public virtual System.CommandLine.Parsing.OptionResult? FindResultFor(System.CommandLine.Option option);

Parameters

option
Option

The option for which to find a result.

Returns

An option result if the option was matched by the parser or has a default value; otherwise, null.

Applies to

System.CommandLine 2.0
منتج الإصدارات
System.CommandLine 2.0