private static void InitImage(XElement xe) { UrlCache urlCache = UrlCache.Create(xe); //if (xe.zXPathValue("UseUrlCache").zTryParseAs(false)) if (urlCache != null) { // xe.zXPathValue("CacheDirectory") _imageCacheManager = new WebImageMongoCacheManager(xe.zXPathValue("MongoServer"), xe.zXPathValue("MongoDatabase"), xe.zXPathValue("MongoCollection"), urlCache); } _imageFilterMinHeight = xe.zXPathValue("ImageFilterMinHeight").zParseAs <int>(); }
public static void Create(XElement xe) { __current = new WebImageMongoManager(WebImageMongoCacheManager.Create(xe)); }
//public void InitImage(XElement xe) //{ // if (xe.zXPathValue("UseUrlCache").zTryParseAs(false)) // { // _imageCacheManager = new WebImageMongoCacheManager(xe.zXPathValue("MongoServer"), xe.zXPathValue("MongoDatabase"), xe.zXPathValue("MongoCollection"), xe.zXPathValue("CacheDirectory")); // } // //_imageFilterMinHeight = xe.zXPathValue("ImageFilterMinHeight").zParseAs<int>(); //} public WebImageMongoManager(WebImageMongoCacheManager imageCacheManager = null, Predicate<ImageMongoCache> imageFilter = null) { _imageCacheManager = imageCacheManager; //_imageFilter = imageFilter; }
//public void InitImage(XElement xe) //{ // if (xe.zXPathValue("UseUrlCache").zTryParseAs(false)) // { // _imageCacheManager = new WebImageMongoCacheManager(xe.zXPathValue("MongoServer"), xe.zXPathValue("MongoDatabase"), xe.zXPathValue("MongoCollection"), xe.zXPathValue("CacheDirectory")); // } // //_imageFilterMinHeight = xe.zXPathValue("ImageFilterMinHeight").zParseAs<int>(); //} public WebImageMongoManager(WebImageMongoCacheManager imageCacheManager = null, Predicate <ImageMongoCache> imageFilter = null) { _imageCacheManager = imageCacheManager; //_imageFilter = imageFilter; }