Ejemplo n.º 1
0
        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>();
        }
Ejemplo n.º 2
0
 public static void Create(XElement xe)
 {
     __current = new WebImageMongoManager(WebImageMongoCacheManager.Create(xe));
 }
Ejemplo n.º 3
0
        //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;
        }
Ejemplo n.º 4
0
        //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;
        }