Rediger

Del via


ArgumentExtensions.AddCompletions Method

Definition

Overloads

AddCompletions<TArgument>(TArgument, CompletionDelegate)

Adds completions for an argument.

AddCompletions<TArgument>(TArgument, Func<CompletionContext,IEnumerable<String>>)

Adds completions for an option.

AddCompletions<TArgument>(TArgument, String[])

Adds completions for an argument.

AddCompletions<TArgument>(TArgument, CompletionDelegate)

Adds completions for an argument.

public:
generic <typename TArgument>
 where TArgument : System::CommandLine::Argument[System::Runtime::CompilerServices::Extension]
 static TArgument AddCompletions(TArgument argument, System::CommandLine::Completions::CompletionDelegate ^ complete);
public static TArgument AddCompletions<TArgument> (this TArgument argument, System.CommandLine.Completions.CompletionDelegate complete) where TArgument : System.CommandLine.Argument;
static member AddCompletions : 'Argument * System.CommandLine.Completions.CompletionDelegate -> 'Argument (requires 'Argument :> System.CommandLine.Argument)
<Extension()>
Public Function AddCompletions(Of TArgument As Argument) (argument As TArgument, complete As CompletionDelegate) As TArgument

Type Parameters

TArgument

The type of the argument.

Parameters

argument
TArgument

The argument for which to add completions.

complete
CompletionDelegate

A CompletionDelegate that will be called to provide completions.

Returns

TArgument

The configured argument.

Applies to

AddCompletions<TArgument>(TArgument, Func<CompletionContext,IEnumerable<String>>)

Adds completions for an option.

public:
generic <typename TArgument>
 where TArgument : System::CommandLine::Argument[System::Runtime::CompilerServices::Extension]
 static TArgument AddCompletions(TArgument argument, Func<System::CommandLine::Completions::CompletionContext ^, System::Collections::Generic::IEnumerable<System::String ^> ^> ^ complete);
public static TArgument AddCompletions<TArgument> (this TArgument argument, Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<string>> complete) where TArgument : System.CommandLine.Argument;
static member AddCompletions : 'Argument * Func<System.CommandLine.Completions.CompletionContext, seq<string>> -> 'Argument (requires 'Argument :> System.CommandLine.Argument)
<Extension()>
Public Function AddCompletions(Of TArgument As Argument) (argument As TArgument, complete As Func(Of CompletionContext, IEnumerable(Of String))) As TArgument

Type Parameters

TArgument

The type of the argument.

Parameters

argument
TArgument

The argument for which to add completions.

complete
Func<CompletionContext,IEnumerable<String>>

A CompletionDelegate that will be called to provide completions.

Returns

TArgument

The option being extended.

Applies to

AddCompletions<TArgument>(TArgument, String[])

Adds completions for an argument.

public:
generic <typename TArgument>
 where TArgument : System::CommandLine::Argument[System::Runtime::CompilerServices::Extension]
 static TArgument AddCompletions(TArgument argument, ... cli::array <System::String ^> ^ values);
public static TArgument AddCompletions<TArgument> (this TArgument argument, params string[] values) where TArgument : System.CommandLine.Argument;
static member AddCompletions : 'Argument * string[] -> 'Argument (requires 'Argument :> System.CommandLine.Argument)
<Extension()>
Public Function AddCompletions(Of TArgument As Argument) (argument As TArgument, ParamArray values As String()) As TArgument

Type Parameters

TArgument

The type of the argument.

Parameters

argument
TArgument

The argument for which to add completions.

values
String[]

The completions to add.

Returns

TArgument

The configured argument.

Applies to