Interface ISourceCache<TObject, TKey>
- Namespace
- DynamicData
- Assembly
- DynamicData.dll
An observable cache which exposes an update API. Used at the root of all observable chains.
public interface ISourceCache<TObject, TKey> : 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
KeySelector
Gets key selector used by the cache to retrieve keys from objects.
Func<TObject, TKey> KeySelector { get; }
Property Value
- Func<TObject, TKey>
Methods
Edit(Action<ISourceUpdater<TObject, TKey>>)
Action to apply a batch update to a cache. Multiple update methods can be invoked within a single batch operation. These operations are invoked within the cache's lock and is therefore thread safe. The result of the action will produce a single change set.
void Edit(Action<ISourceUpdater<TObject, TKey>> updateAction)
Parameters
updateAction
Action<ISourceUpdater<TObject, TKey>>The update action.