HybridIndex<T>
Indexes a collection view using list-based processing for smaller list sources and an alternate path for larger sources.
Definition
Namespace:Telerik.Collections.Generic
Assembly:Telerik.WinControls.dll
Type Parameters:
T
The data-item type stored by the index.
Syntax:
public class HybridIndex<T> : Index<T>, IReadOnlyCollection<T>, IEnumerable where T : IDataItem
Inheritance: objectIndex<T>HybridIndex<T>
Implements:
Inherited Members
Constructors
Initializes an index using an explicit source sequence and the specified view's operations.
public HybridIndex(RadCollectionView<T> collectionView, IEnumerable<T> source)
The view whose filtering and sorting settings determine the indexed items.
sourceIEnumerable<T>The sequence to index.
Initializes an index using the source sequence of the specified view.
public HybridIndex(RadCollectionView<T> collectionView)
The view whose source and operations determine the indexed items.
Properties
Items
IList<T>
Gets the current indexed items, rebuilding them when the view version changes.
public override IList<T> Items { get; }
Overrides:
Gets or sets whether filtering is distributed across worker threads when the index is rebuilt.
public bool MultithreadedFiltering { get; set; }
Methods
Collects items that pass the collection view's filter.
protected virtual List<T> GetFilteredItems(IEnumerable<T> e)
The sequence to evaluate.
Returns:List<T>
The matching items in enumeration order.
When MultithreadedFiltering is enabled, filter checks are divided among worker threads.
Replaces the source sequence and initializes the index from it.
public override void Load(IEnumerable<T> source)
The sequence to index.
Overrides:
Processes the source using the alternate indexing path, using a red-black tree when sorting is active.
protected virtual void PerformWithBinaryTree()
Filters and sorts items using a list, preserving source order for items that compare equally.
protected virtual void PerformWithList()
Compatibility hook that delegates to PerformWithList().
[Obsolete("Override the PerformWithList method instead")]
protected virtual void PerformWithQuickSort()
Increments the cached version marker used by Perform().
protected override void SetDirty()
Overrides: