Example #1
0
        public static IObservable <PageQR> GetPagesQR(PageRequest request, int maxPages = 100)
        {
            PageQR startPage           = new PageQR(request, null);
            IObservable <PageQR> pages = Observable.Range(1, maxPages)
                                         .Scan(startPage, (acc, num) => GetPageQR(acc, num))
                                         .TakeWhile(page => page.Response.MaxModif != null);

            return(pages);
        }
Example #2
0
        private static PageQR GetPageQR(PageQR prevPage, int num)
        {
            PageRequest  prevRequest = prevPage.Request;
            DateTime?    lastModif   = prevPage.Response?.MaxModif ?? prevRequest.ModifAfter;
            PageRequest  request     = prevRequest.CloneWith(lastModif);
            PageResponse response    = WebClient.GetPageResponse(request, num);
            PageQR       page        = new PageQR(request, response);

            return(page);
        }
Example #3
0
 private static PageRequest WriteToFile(PageQR page)
 {
     //TODO
     return(page.Request);
 }