Method GetLockedItem
GetLockedItem(TIndex)
Gets locked item which allows to access index and value as fast as possible.
public IndexedValues<TIndex, TValue>.ILockedItem GetLockedItem(TIndex index)
Parameters
index
TIndexIndex of value.
Returns
- IndexedValues<TIndex, TValue>.ILockedItem
GetLockedItem(TIndex, Func<TValue?>)
Gets locked item initialized with the default value.
public IndexedValues<TIndex, TValue>.ILockedItem GetLockedItem(TIndex index, Func<TValue?> getDefault)
Parameters
index
TIndexIndex of value.
getDefault
Func<TValue>Function which returns default value for the specified index. It is called when item with the specified index is locked for the first time.
Returns
- IndexedValues<TIndex, TValue>.ILockedItem