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)

Initializes a new instance of the CompletionItemSortComparer class.

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

Gets the ICompletionSession over which this comparer operates, useful for harnessing session options in the sort algorithm.

public ICompletionSession Session { get; }

Property Value

ICompletionSession:

The ICompletionSession over which this comparer operates.

Methods

Compare(ICompletionItem, ICompletionItem)

Sorts two objects.

public virtual int Compare(ICompletionItem x, ICompletionItem y)
Parameter Type Description
x ICompletionItem

The left object.

y ICompletionItem

The right object.

Returns

int:

A value indicating whether one is less than, equal to or greater than the other.

Inherited Members