Muokkaa

Jaa


OptionExtensions.AddCompletions Method

Definition

Overloads

AddCompletions<TOption>(TOption, CompletionDelegate)

Adds completions for an option.

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

Adds completions for an option.

AddCompletions<TOption>(TOption, String[])

Adds completions for an option.

AddCompletions<TOption>(TOption, CompletionDelegate)

Adds completions for an option.

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

Type Parameters

TOption

The type of the option.

Parameters

option
TOption

The option for which to add completions.

complete
CompletionDelegate

A CompletionDelegate that will be called to provide completions.

Returns

TOption

The option being extended.

Applies to

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

Adds completions for an option.

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

Type Parameters

TOption

The type of the option.

Parameters

option
TOption

The option for which to add completions.

complete
Func<CompletionContext,IEnumerable<String>>

A CompletionDelegate that will be called to provide completions.

Returns

TOption

The option being extended.

Applies to

AddCompletions<TOption>(TOption, String[])

Adds completions for an option.

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

Type Parameters

TOption

The type of the Option.

Parameters

option
TOption

The option for which to add completions.

values
String[]

The completions to add.

Returns

TOption

The option being extended.

Applies to