SecondaryIndex class¶
Attributes: [DebuggerDisplay("SecondaryIndex: {_shards}")]
Defined in
Namespace: ReactiveList.Reactive.Core Assembly: ReactiveList.Reactive.dll Full name: ReactiveList.Reactive.Core.SecondaryIndex<T1, T2> Modifiers: public sealed
Summary¶
View source (opens in a new tab)
Provides a thread-safe secondary index for associating items with keys derived from a selector function.
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
Class hierarchy
classDiagram
class SecondaryIndex~T1,T2~
class ISecondaryIndex~T~ {
<>
}
ISecondaryIndex~T~ <|.. SecondaryIndex~T1,T2~
Implements: ISecondaryIndex
Remarks¶
The index is a multiset: an item added twice is returned twice by Lookup and must be removed twice. The key is computed when an item is added. If an item's key changes afterwards, OnRemoved still finds and removes the stale entry, but lookups reflect the key the item had when it was added.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Provides a thread-safe secondary index for associating items with keys derived from a selector function. |
Methods¶
| Name | Summary |
|---|---|
| OnAdded | Adds the specified item to the collection. |
| OnRemoved | Removes the specified item from the collection. |
| OnUpdated | Handles the update of an item. |
| Lookup | Retrieves all values associated with the specified key. |
| Clear | Removes all items from the collection. |
| MatchesKey | Determines whether the specified item's key matches the provided key object. |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)