Interface ICacheUpdater<TObject, TKey>
- Namespace
- Dynamic
Data
- Assembly
- DynamicData.dll
Api for updating an intermediate cache.
Use edit to produce singular change set.
NB:The evaluate method is used to signal to any observing operators to reevaluate whether the object still matches downstream operators. This is primarily targeted to inline object changes such as datetime and calculated fields.
public interface ICacheUpdater<TObject, TKey> : IQuery<TObject, TKey> where TObject : notnull where TKey : notnull
Type Parameters
TObjectThe type of the object.
TKeyThe type of the key.
- Inherited Members
- Extension Methods
Methods
AddOrUpdate(IEnumerable<KeyValuePair<TKey, TObject>>)
Adds or updates the specified key value pairs.
Parameters
keyValuePairsIEnumerable<KeyValue <TKey, TObject>>Pair The key value pairs to add or update.
AddOrUpdate(KeyValuePair<TKey, TObject>)
Adds or updates the specified key value pair.
Parameters
itemKeyValue <TKey, TObject>Pair The key value pair to add or update.
AddOrUpdate(TObject, TKey)
Adds or updates the specified item / key pair.
Parameters
itemTObjectThe item to add or update.
keyTKeyThe key to add or update.
Clear()
Clears all items from the underlying cache.
Clone(IChangeSet<TObject, TKey>)
Clones the change set to the cache.
Parameters
changesIChangeSet <TObject, TKey>The changes to clone.
GetKey(TObject)
Gets the key associated with the object.
Parameters
itemTObjectThe item.
Returns
- TKey
The key for the specified object.
GetKeyValues(IEnumerable<TObject>)
Gets the key values for the specified items.
Parameters
itemsIEnumerable<TObject>The items.
Returns
- IEnumerable<Key
Value <TKey, TObject>>Pair An enumeration of key value pairs of the key and the object.
Refresh()
Sends a signal for operators to recalculate it's state.
Refresh(IEnumerable<TKey>)
Refreshes the items matching the specified keys.
Parameters
keysIEnumerable<TKey>The keys.
Refresh(TKey)
Refreshes the item matching the specified key.
Parameters
keyTKeyThe key to refresh.
Remove(IEnumerable<KeyValuePair<TKey, TObject>>)
Removes the specified key value pairs.
Parameters
itemsIEnumerable<KeyValue <TKey, TObject>>Pair The key value pairs to remove.
Remove(IEnumerable<TKey>)
Removes the specified keys.
Parameters
keysIEnumerable<TKey>The keys to remove the values for.
Remove(KeyValuePair<TKey, TObject>)
Removes the specified key value pair.
Parameters
itemKeyValue <TKey, TObject>Pair The key value pair to remove.
Remove(TKey)
Remove the specified keys.
Parameters
keyTKeyThe key of the item to remove.
RemoveKey(TKey)
Overload of remove due to ambiguous method when TObject and TKey are of the same type.
Parameters
keyTKeyThe key.
RemoveKeys(IEnumerable<TKey>)
Overload of remove due to ambiguous method when TObject and TKey are of the same type.
Parameters
keyIEnumerable<TKey>The key.
Update(IChangeSet<TObject, TKey>)
Updates using changes using the specified change set.
Parameters
changesIChangeSet <TObject, TKey>The changes to update with.