Skip to content

)}

IQuaternaryDictionary.AddValueIndex(string, Func) method

Defined in

Type: IQuaternaryDictionary Namespace: ReactiveList.Reactive.Collections Assembly: ReactiveList.Reactive.dll

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

void AddValueIndex<TIndexKey>(string indexName, Func<TValue?, TIndexKey> keySelector) where TIndexKey : notnull

Summary: Adds a value index with the specified name, using the provided key selector to generate index keys for values.

Type parameters

NameDescription
TIndexKeyThe type of the key used for indexing. Must be non-nullable.

Parameters

NameTypeDescription
indexNamestring (opens in a new tab)The unique name of the value index to add. Cannot be null or empty.
keySelectorFunc (opens in a new tab)A function that extracts the index key from a value. Cannot be null.

Remarks

Value indexes enable efficient lookups and queries based on the key generated by the key selector. Adding an index with a duplicate name may result in an error or overwrite, depending on the implementation.