Interface IObservableCache<TObject, TKey>
- Namespace
- DynamicData
- Assembly
- DynamicData.dll
A cache for observing and querying in memory data. With additional data access operators.
public interface IObservableCache<TObject, TKey> : IConnectableCache<TObject, TKey>, IDisposable where TObject : notnull where TKey : notnull
Type Parameters
TObject
The type of the object.
TKey
The type of the key.
- Inherited Members
- Extension Methods
Properties
Count
Gets the total count of cached items.
int Count { get; }
Property Value
Items
Gets the Items.
IReadOnlyList<TObject> Items { get; }
Property Value
- IReadOnlyList<TObject>
KeyValues
Gets the key value pairs.
IReadOnlyDictionary<TKey, TObject> KeyValues { get; }
Property Value
- IReadOnlyDictionary<TKey, TObject>
Keys
Gets the keys.
IReadOnlyList<TKey> Keys { get; }
Property Value
- IReadOnlyList<TKey>
Methods
Lookup(TKey)
Lookup a single item using the specified key.
Optional<TObject> Lookup(TKey key)
Parameters
key
TKeyThe key.
Returns
- Optional<TObject>
An optional with the looked up value.
Remarks
Fast indexed lookup.