ArgumentExtensions.AddCompletions 方法

定义

重载

AddCompletions<TArgument>(TArgument, CompletionDelegate)

添加参数的完成。

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

添加选项的完成。

AddCompletions<TArgument>(TArgument, String[])

添加参数的完成。

AddCompletions<TArgument>(TArgument, CompletionDelegate)

添加参数的完成。

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

类型参数

TArgument

自变量类型。

参数

argument
TArgument

要为其添加完成项的参数。

complete
CompletionDelegate

CompletionDelegate将调用 以提供完成的 。

返回

TArgument

配置的参数。

适用于

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

添加选项的完成。

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

类型参数

TArgument

自变量类型。

参数

argument
TArgument

要为其添加完成项的参数。

complete
Func<CompletionContext,IEnumerable<String>>

CompletionDelegate将调用 以提供完成的 。

返回

TArgument

正在扩展的选项。

适用于

AddCompletions<TArgument>(TArgument, String[])

添加参数的完成。

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

类型参数

TArgument

自变量类型。

参数

argument
TArgument

要为其添加完成项的参数。

values
String[]

要添加的完成。

返回

TArgument

配置的参数。

适用于