Table of Contents

Method GetLockedItem

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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 TIndex

Index 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 TIndex

Index 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