ModelExtensionsGetOrCreateT Method
Namespace: Centralpoint.Web.ModelsAssembly: Centralpoint.Web (in Centralpoint.Web.dll) Version: 1.0.0.0 (1.0.0.0)
private static T GetOrCreate<T>(
this Cache cache,
string key,
Object id,
Func<T, bool> find,
Func<T> select,
MemoryCacheKeysModelCacheSize size = MemoryCacheKeysModelCacheSize.Default
)
where T : ModelCache
<ExtensionAttribute>
Private Shared Function GetOrCreate(Of T As ModelCache) (
cache As Cache,
key As String,
id As Object,
find As Func(Of T, Boolean),
select As Func(Of T),
Optional size As MemoryCacheKeysModelCacheSize = MemoryCacheKeysModelCacheSize.Default
) As T
- cache Cache
-
- key String
-
- id Object
-
- find FuncT, Boolean
-
- select FuncT
-
- size MemoryCacheKeysModelCacheSize (Optional)
-
- T
TIn Visual Basic and C#, you can call this method as an instance method on any object of type
Cache. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).