/// <summary> /// Construct: using the implementtation type /// </summary> /// <param name="type"></param> public CachServiceAdaptor(CacheServiceType type) { switch (type) { case CacheServiceType.IMAGE: _target = new ImageCacheServiceImpl(); break; case CacheServiceType.SERVICE: _target = new ServiceCacheServiceImpl <T>(); break; default: throw new ArgumentException("Implementation type error!"); } }
protected ICacheService GetCacheService(CacheServiceType cacheServiceType) { return(CacheServiceFactory.GetCacheService(cacheServiceType)); }
protected CacheServiceBase(CacheServiceType cacheServiceType, ISerializerFactory serializerFactory) { Type = cacheServiceType; this.serializerFactory = serializerFactory; }