-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathConfigCachingStrategyFactory.cs
More file actions
27 lines (23 loc) · 1.52 KB
/
Copy pathConfigCachingStrategyFactory.cs
File metadata and controls
27 lines (23 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using SharpRepository.Repository.Caching;
namespace SharpRepository.Repository.Configuration
{
public interface IConfigCachingStrategyFactory
{
ICachingStrategy<T, TKey> GetInstance<T, TKey>(ICachingProvider cachingProvider) where T : class;
ICompoundKeyCachingStrategy<T, TKey, TKey2> GetInstance<T, TKey, TKey2>(ICachingProvider cachingProvider) where T : class;
ICompoundKeyCachingStrategy<T, TKey, TKey2, TKey3> GetInstance<T, TKey, TKey2, TKey3>(ICachingProvider cachingProvider) where T : class;
ICompoundKeyCachingStrategy<T> GetCompoundKeyInstance<T>(ICachingProvider cachingProvider) where T : class;
}
public abstract class ConfigCachingStrategyFactory : IConfigCachingStrategyFactory
{
protected ICachingStrategyConfiguration CachingStrategyConfiguration;
protected ConfigCachingStrategyFactory(ICachingStrategyConfiguration config)
{
CachingStrategyConfiguration = config;
}
public abstract ICachingStrategy<T, TKey> GetInstance<T, TKey>(ICachingProvider cachingProvider) where T : class;
public abstract ICompoundKeyCachingStrategy<T, TKey, TKey2> GetInstance<T, TKey, TKey2>(ICachingProvider cachingProvider) where T : class;
public abstract ICompoundKeyCachingStrategy<T, TKey, TKey2, TKey3> GetInstance<T, TKey, TKey2, TKey3>(ICachingProvider cachingProvider) where T : class;
public abstract ICompoundKeyCachingStrategy<T> GetCompoundKeyInstance<T>(ICachingProvider cachingProvider) where T : class;
}
}