public WebImageMongoCacheManager_v1(string server, string database, string collectionName, string directory)
 {
     _server = server;
     _database = database;
     _collectionName = collectionName;
     _urlCache = new UrlCache_v1(directory, UrlFileNameType.Host | UrlFileNameType.Path, (url, requestParameters) => zurl.GetDomain(url));
 }
Пример #2
0
 public WebImageMongoCacheManager_v1(string server, string database, string collectionName, string directory)
 {
     _server         = server;
     _database       = database;
     _collectionName = collectionName;
     _urlCache       = new UrlCache_v1(directory, UrlFileNameType.Host | UrlFileNameType.Path, (url, requestParameters) => zurl.GetDomain(url));
 }
Пример #3
0
        public static UrlCache_v1 GetUrlCache()
        {
            UrlCache_v1 urlCache = null;

            if (__useUrlCache)
            {
                urlCache = new UrlCache_v1(__cacheDirectory, __urlFileNameType, (url, requestParameters) => (RapideDdl_LoadPostDetailFromWebManager.GetPostDetailKey(url) / 1000 * 1000).ToString());
            }
            return(urlCache);
        }
Пример #4
0
        public static UrlCache_v1 GetUrlCache()
        {
            UrlCache_v1 urlCache = null;

            if (__useUrlCache)
            {
                urlCache = new UrlCache_v1(__cacheDirectory, __urlFileNameType);
            }
            return(urlCache);
        }
Пример #5
0
        public static void Test_RapideDdl_LoadPostImages_01(string query = null, string sort = null, int limit = 10, bool loadImage = false)
        {
            //IEnumerable<ImageHtml> images = from image in (from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage) select post.images) select image;
            //IEnumerable<ImageHtml> images = from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage) select (from image in post.images select image);
            //RunSource.CurrentRunSource.View(from image in (from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage) select post.images) select image);
            //RunSource.CurrentRunSource.View(from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage) select (from image in post.images select image));
            //var q = RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage).SelectMany(post => post.images);
            //var q = from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage) select (from image in post.images select image);
            //var q = from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage)
            //        select (from image in post.images
            //                select new { source = image.Source, title = image.Title, width = image.ImageWidth, height = image.ImageHeight, date = post.creationDate, url = post.sourceUrl });
            //var q1 = from post in RapideDdl_LoadPostDetail.Find(query, sort: sort, limit: limit, loadImage: loadImage) select (from image in post.images select image.Source);
            var         q1       = from post in RapideDdl_LoadPostDetail.CurrentLoadPostDetail.FindDocuments(query, sort: sort, limit: limit, loadImage: loadImage) select(from image in post.images select image.Url);
            var         q2       = q1.SelectMany(image => image).Distinct().OrderBy(image => image);
            UrlCache_v1 urlCache = new UrlCache_v1(@"c:\pib\_cacheImage", UrlFileNameType.Path | UrlFileNameType.Host, (url, requestParameters) => zurl.GetDomain(url));
            var         q3       = from image in q2 select new { image = image, file = zurl.UrlToFileName(image, UrlFileNameType.Path | UrlFileNameType.Host), file2 = urlCache.GetUrlSubPath(image) };
            var         q        = q3;

            //RunSource.CurrentRunSource.View(q);
            q.zView();
        }
Пример #6
0
 public FreeTelechargement_LoadHeaderPageFromWebManager(UrlCache_v1 urlCache = null)
     : base(urlCache)
 {
 }
Пример #7
0
 public ExtremeDown_LoadHeaderPageFromWebManager(UrlCache_v1 urlCache = null)
     : base(urlCache)
 {
 }
Пример #8
0
 protected void SetUrlCache(UrlCache_v1 urlCache)
 {
     _urlCache = urlCache;
 }
Пример #9
0
 public LoadDataFromWebManager_v3(UrlCache_v1 urlCache = null)
 {
     _urlCache = urlCache;
 }
Пример #10
0
 public LoadFromWeb_v2(UrlCache_v1 urlCache = null)
 {
     _urlCache = urlCache;
 }
Пример #11
0
 public RapideDdl_LoadPostDetailFromWebManager(UrlCache_v1 urlCache = null)
     : base(urlCache)
 {
 }
Пример #12
0
 protected void SetUrlCache(UrlCache_v1 urlCache)
 {
     _urlCache = urlCache;
 }
Пример #13
0
 public LoadFromWeb_v2(UrlCache_v1 urlCache = null)
 {
     _urlCache = urlCache;
 }
Пример #14
0
 public Telechargementz_LoadPostDetailFromWebManager(UrlCache_v1 urlCache = null)
     : base(urlCache)
 {
 }
Пример #15
0
 public LoadDataFromWeb_v2(GetDataFromWebDelegate_v2 <T> getDataFromWeb, UrlCache_v1 urlCache = null)
 {
     _getDataFromWeb = getDataFromWeb;
     _urlCache       = urlCache;
 }
Пример #16
0
 public RapideDdl_LoadHeaderPageFromWebManager(UrlCache_v1 urlCache = null)
     : base(urlCache)
 {
 }
Пример #17
0
 public ExtremeDown_LoadPostDetailFromWebManager(UrlCache_v1 urlCache = null)
     : base(urlCache)
 {
 }