Exemple #1
0
        public CacheFactoryComponentResult CreateCacheComponents()
        {
            var cacheEngine    = CreateCacheEngine();
            var dependencyMgr  = new GenericDependencyManager(cacheEngine, _logger, _config);
            var featureSupport = new MemoryFeatureSupport();
            var result         = CacheFactoryComponentResult.Create(cacheEngine, dependencyMgr, featureSupport);

            return(result);
        }
Exemple #2
0
        public static CacheFactoryComponentResult Create(ICache cache, ICacheDependencyManager dependencyManager, ICacheFeatureSupport featureSupport)
        {
            var result = new CacheFactoryComponentResult();

            if (cache == null || featureSupport == null)
            {
                throw new ArgumentNullException("Cache or Feature support component cannot be null");
            }
            result.Cache             = cache;
            result.DependencyManager = dependencyManager;
            result.FeatureSupport    = featureSupport;
            return(result);
        }