CompletionSourceExtensions.Add 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
| Name | Description |
|---|---|
| Add(List<Func<CompletionContext,IEnumerable<CompletionItem>>>, Func<CompletionContext,IEnumerable<String>>) |
Adds a completion source using a delegate. |
| Add(List<Func<CompletionContext,IEnumerable<CompletionItem>>>, String[]) |
Adds a completion source using a delegate. |
Add(List<Func<CompletionContext,IEnumerable<CompletionItem>>>, Func<CompletionContext,IEnumerable<String>>)
Adds a completion source using a delegate.
public:
[System::Runtime::CompilerServices::Extension]
static void Add(System::Collections::Generic::List<Func<System::CommandLine::Completions::CompletionContext ^, System::Collections::Generic::IEnumerable<System::CommandLine::Completions::CompletionItem ^> ^> ^> ^ completionSources, Func<System::CommandLine::Completions::CompletionContext ^, System::Collections::Generic::IEnumerable<System::String ^> ^> ^ completionsDelegate);
public static void Add(this System.Collections.Generic.List<Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> completionSources, Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<string>> completionsDelegate);
static member Add : System.Collections.Generic.List<Func<System.CommandLine.Completions.CompletionContext, seq<System.CommandLine.Completions.CompletionItem>>> * Func<System.CommandLine.Completions.CompletionContext, seq<string>> -> unit
<Extension()>
Public Sub Add (completionSources As List(Of Func(Of CompletionContext, IEnumerable(Of CompletionItem))), completionsDelegate As Func(Of CompletionContext, IEnumerable(Of String)))
Parameters
- completionSources
- List<Func<CompletionContext,IEnumerable<CompletionItem>>>
The list of completion sources to add to.
- completionsDelegate
- Func<CompletionContext,IEnumerable<String>>
The delegate to be called when calculating completions.
Applies to
Add(List<Func<CompletionContext,IEnumerable<CompletionItem>>>, String[])
Adds a completion source using a delegate.
public:
[System::Runtime::CompilerServices::Extension]
static void Add(System::Collections::Generic::List<Func<System::CommandLine::Completions::CompletionContext ^, System::Collections::Generic::IEnumerable<System::CommandLine::Completions::CompletionItem ^> ^> ^> ^ completionSources, ... cli::array <System::String ^> ^ completions);
public static void Add(this System.Collections.Generic.List<Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> completionSources, params string[] completions);
static member Add : System.Collections.Generic.List<Func<System.CommandLine.Completions.CompletionContext, seq<System.CommandLine.Completions.CompletionItem>>> * string[] -> unit
<Extension()>
Public Sub Add (completionSources As List(Of Func(Of CompletionContext, IEnumerable(Of CompletionItem))), ParamArray completions As String())
Parameters
- completionSources
- List<Func<CompletionContext,IEnumerable<CompletionItem>>>
The list of completion sources to add to.
- completions
- String[]
A list of strings to be suggested for command line completions.