Пример #1
0
        private static CacheManager GetInstance(CacheSettings cacheSettings, CacheManager newAdapter)
        {
            CacheManager instance = null;

            if (_caches.Count > 0)
                foreach (var cache in _caches)
                    if (cache.CacheSettings.Name.Equals(cacheSettings.Name))
                        instance = cache;

            if (instance == null)
            {
                instance = newAdapter;
                _caches.Add(newAdapter);
            }

            return instance;
        }
Пример #2
0
 public Ordering()
 {
     this._cache = CacheManagerFactory.GetCacheManager("Meal");
 }