CompletionItemSortComparer Class
Provides the default IComparer<T> implementation that can be used to sort ICompletionItem objects within an ICompletionSession via its SortItems() method.
public class CompletionItemSortComparer
- Inheritance:
- object object
Constructors
CompletionItemSortComparer(ICompletionSession)
Provides the default IComparer<T> implementation that can be used to sort ICompletionItem objects within an ICompletionSession via its SortItems() method.
public CompletionItemSortComparer(ICompletionSession session)
| Parameter | Type | Description |
|---|---|---|
| session | ICompletionSession | The ICompletionSession over which this comparer operates, useful for harnessing session options in the sort algorithm. |
Properties
Session
The ICompletionSession over which this comparer operates, useful for harnessing session options in the sort algorithm.
Methods
Compare(ICompletionItem?, ICompletionItem?)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public virtual int Compare(ICompletionItem? x, ICompletionItem? y)
| Parameter | Type | Description |
|---|---|---|
| x | ICompletionItem | The first object to compare. |
| y | ICompletionItem | The second object to compare. |
Returns
- int:
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zero xis less thany.Zero xequalsy.Greater than zero xis greater thany.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()