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
TObject
The type of the object.
TKey
The type of the key.
- Inherited Members
Methods
AddOrUpdate(IEnumerable<KeyValuePair<TKey, TObject>>)
Adds or updates the specified key value pairs.
Parameters
keyValuePairs
IEnumerable<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
item
KeyValue <TKey, TObject>Pair The key value pair to add or update.
AddOrUpdate(TObject, TKey)
Adds or updates the specified item / key pair.
Parameters
item
TObjectThe item to add or update.
key
TKeyThe 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
changes
IChangeSet <TObject, TKey>The changes to clone.
GetKey(TObject)
Gets the key associated with the object.
Parameters
item
TObjectThe item.
Returns
- TKey
The key for the specified object.
GetKeyValues(IEnumerable<TObject>)
Gets the key values for the specified items.
Parameters
items
IEnumerable<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
keys
IEnumerable<TKey>The keys.
Refresh(TKey)
Refreshes the item matching the specified key.
Parameters
key
TKeyThe key to refresh.
Remove(IEnumerable<KeyValuePair<TKey, TObject>>)
Removes the specified key value pairs.
Parameters
items
IEnumerable<KeyValue <TKey, TObject>>Pair The key value pairs to remove.
Remove(IEnumerable<TKey>)
Removes the specified keys.
Parameters
keys
IEnumerable<TKey>The keys to remove the values for.
Remove(KeyValuePair<TKey, TObject>)
Removes the specified key value pair.
Parameters
item
KeyValue <TKey, TObject>Pair The key value pair to remove.
Remove(TKey)
Remove the specified keys.
Parameters
key
TKeyThe 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
key
TKeyThe key.
RemoveKeys(IEnumerable<TKey>)
Overload of remove due to ambiguous method when TObject and TKey are of the same type.
Parameters
key
IEnumerable<TKey>The key.
Update(IChangeSet<TObject, TKey>)
Updates using changes using the specified change set.
Parameters
changes
IChangeSet <TObject, TKey>The changes to update with.