In This Article

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.

public ICompletionSession Session { get; }

Property Value

ICompletionSession

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 x and y, as shown in the following table.

Value Meaning
Less than zerox is less than y.
Zerox equals y.
Greater than zerox is greater than y.

Inherited Members

Extension Methods