Method Create
Create<TKey, TValue>(Cache<TKey, TValue>, TKey)
Creates a dependency specification that can be supplied to a CreatePolicy when adding a dependant (child) object to a cache.
public static DependencySpec Create<TKey, TValue>(Cache<TKey, TValue> cache, TKey key)
Parameters
cache
Cache<TKey, TValue>The Cache<TKey, TValue> instance containing the parent object.
key
TKeyThe key identifying the parent object.
Returns
- DependencySpec
A DependencySpec instance.
Type Parameters
TKey
Type of key used to identify the parent object.
TValue
Type of the parent object.