Class CollectionCacheRepository<TValue>
A thread-safe collection cache repository for types.
Inherited Members
Namespace: Swan.Collections
Syntax
public class CollectionCacheRepository<TValue>
Type Parameters
Name | Description |
---|---|
TValue | The type of member to cache. |
Methods
ContainsKey(Type)
Determines whether the cache contains the specified key.
Declaration
public bool ContainsKey(Type key)
Parameters
Type | Name | Description |
---|---|---|
Type | key | The key. |
Returns
Type | Description |
---|---|
Boolean |
|
Retrieve(Type, Func<Type, IEnumerable<TValue>>)
Retrieves the properties stored for the specified type. If the properties are not available, it calls the factory method to retrieve them and returns them as an array of PropertyInfo.
Declaration
public IEnumerable<TValue> Retrieve(Type key, Func<Type, IEnumerable<TValue>> factory)
Parameters
Type | Name | Description |
---|---|---|
Type | key | The key. |
Func<Type, IEnumerable<TValue>> | factory | The factory. |
Returns
Type | Description |
---|---|
IEnumerable<TValue> | An array of the properties stored for the specified type. |