CompletionItemMatcherBase Class
Represents an abstract object that can match completion items based on supplied text.
public abstract class CompletionItemMatcherBase : ICompletionItemMatcher, IKeyedObject
- Inheritance:
- object object
- Derived:
- RegexCompletionItemMatcherBase
- Implements:
- ICompletionItemMatcher IKeyedObject
Constructors
CompletionItemMatcherBase()
Initializes an instance of the class.
protected CompletionItemMatcherBase()
Properties
Key
The string-based key that identifies the object.
Methods
GetHighlightedTextRanges(ICompletionSession, ICompletionItem, string)
Returns a collection of TextRange objects that specify the ranges of matched characters within an ICompletionItem's Text.
public virtual IEnumerable<TextRange>? GetHighlightedTextRanges(ICompletionSession session, ICompletionItem item, string text)
| Parameter | Type | Description |
|---|---|---|
| session | ICompletionSession | The ICompletionSession in which the match is to be made. |
| item | ICompletionItem | The ICompletionItem against which to match. |
| text | string | The text to use for matching. |
Returns
Match(ICompletionSession, IEnumerable, string, bool)
Attempts to locate an ICompletionItem match based on specified text.
public abstract CompletionSelection? Match(ICompletionSession session, IEnumerable items, string text, bool uniqueFullMatchOnly)
| Parameter | Type | Description |
|---|---|---|
| session | ICompletionSession | The ICompletionSession in which the match is to be made. |
| items | IEnumerable | The collection of items against which to match. |
| text | string | The text to use for matching. |
| uniqueFullMatchOnly | bool | Whether to only return a match if it is a full and unique match. |
Returns
- CompletionSelection:
A CompletionSelection instance, if a match was made.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()