WordList class
Namespace: Arlecchino.Editing · Assembly: Arlecchino
Words an application already holds: the names of its commands, the hosts it knows. They are read through a delegate, so the list is whatever it is when the word is being finished.
public sealed class WordList : ISuggestsWords
Implements ISuggestsWords
Constructors
| Member | Summary |
|---|---|
WordList(Func<IReadOnlyList<string>>) | Offers what a delegate lists. |
Methods
| Member | Summary |
|---|---|
SuggestAsync(CompletionAsk, CancellationToken) | The words that begin with what has been typed, in the order they were listed. Case is forgiven, since a name is looked for rather than checked. |
Constructors in detail
WordList(Func<IReadOnlyList<string>>)
public WordList(Func<IReadOnlyList<string>> words);
Offers what a delegate lists.
Parameters
| Name | Type | Description |
|---|---|---|
words | Func<TResult><IReadOnlyList<T><string>> | Everything that could be typed, whether it fits what has been or not. |
Methods in detail
SuggestAsync(CompletionAsk, CancellationToken)
public ValueTask<IReadOnlyList<string>> SuggestAsync(CompletionAsk ask, CancellationToken token);
The words that begin with what has been typed, in the order they were listed. Case is forgiven, since a name is looked for rather than checked.
Parameters
| Name | Type | Description |
|---|---|---|
ask | CompletionAsk | The word and the line it stands in. |
token | CancellationToken | Not waited on: the list is already here. |
Returns ValueTask<TResult><IReadOnlyList<T><string>> — What fits.