public AvitoLoadLinksBeforeDate(IHttpWeb httpWeb, DateTime date, int maxWrongDate)
     : base(httpWeb)
 {
     this.maxWrongDate = maxWrongDate;
       this.date = date;
       LoadMonth();
 }
Ejemplo n.º 2
0
 public bool LoadImage(string itemImage, IHttpWeb web, string guid, string guid2, string dirName)
 {
     const int timeout = 60 * 1000;
       try
       {
     var req = web.GetHttpWebReq(itemImage);
     req.Timeout = timeout;
     var resp = web.GetHttpWebResp(req);
     if (resp != null)
     {
       resp.GetResponseStream().ReadTimeout = timeout;
       var imageStream = resp.GetResponseStream();
       if (imageStream != null)
       {
     try
     {
       var image = Image.FromStream(imageStream);
       ResizeAndSave(image, image.Size, "_original", guid, dirName);
       ResizeAndSave(image, new Size(295, 190), "_preview", guid, dirName);
       ResizeAndSave(image, new Size(80, 80), "_thumbnail", guid, dirName);
     }
     catch (Exception ex)
     {
       throw new Exception("LoadImage error: " + ex.Message, ex);
     }
     return true;
       }
     }
       }
       catch (Exception ex)
       {
     throw new Exception("Request timeout: " + ex.Message, ex);
       }
       return false;
 }
 public AvitoLoadImageDeferentSize(IHttpWeb httpweb, string pathFolder, MySqlDB _mySqlDB, string _ftpUsername, string _ftpPassword, ImageParsedCountHelper imageParsed)
     : base(httpweb, pathFolder, imageParsed)
 {
     mySqlDB = _mySqlDB;
       ftpUsername = _ftpUsername;
       ftpPassword = _ftpPassword;
       imageLoader = new ImageLoader(PathToFolder, ftpUsername, ftpPassword);
 }
Ejemplo n.º 4
0
 public EbayLoadImage(IHttpWeb httpweb, string pathFolder, MySqlDB _mySqlDB, string _ftpUsername, string _ftpPassword)
 {
     PathToFolder = pathFolder;
       web = httpweb;
       mySqlDB = _mySqlDB;
       ftpUsername = _ftpUsername;
       ftpPassword = _ftpPassword;
       imageLoader = new ImageLoader(PathToFolder, ftpUsername, ftpPassword);
 }
 public AvitoLoadLinksBeforeDateRepeat(IHttpWeb httpWeb, int limitLink, Func<int, bool> IsNewAd, DateTime date, int maxWrongDate)
     : base(httpWeb)
 {
     limitLinks = limitLink;
       this.IsNewAd = IsNewAd;
       this.maxWrongDate = maxWrongDate;
       this.date = date;
       LoadMonth();
 }
Ejemplo n.º 6
0
 public AvitoLoadImages(IHttpWeb httpweb, string pathFolder, ImageParsedCountHelper imageCount = null)
 {
     imageParsedCountHelper = imageCount;
       WebCl = httpweb;
       PathToFolder = pathFolder.TrimEnd('/', '\\');
       if ((pathFolder.ToLower()).StartsWith("ftp://") == false)
       {
     var isEsist = Directory.Exists(pathFolder);
     {
       if (!isEsist)
     throw new FileNotFoundException("LoadImage error: Path no exists '" + pathFolder + "'");
     }
       }
 }
Ejemplo n.º 7
0
 public IrrLoadLinks(IHttpWeb httpWeb)
 {
     this.httpWeb = httpWeb;
 }
 public IrrLoadLinksLimitPage(IHttpWeb webCl, int limitPage)
     : base(webCl)
 {
 }
 public AvitoSendMessageToOwner(IHttpWeb webCl)
 {
     WebCl = webCl;
 }
Ejemplo n.º 10
0
 public IrrPhone()
 {
     httpWeb = new WebCl();
 }
Ejemplo n.º 11
0
 public IrrPhone(IHttpWeb httpWeb)
 {
     this.httpWeb = httpWeb;
 }
 public AvitoSendMessageToOwner(IHttpWeb webCl, EmailUnit email)
     : this(webCl)
 {
     email.Message += Environment.NewLine + Guid.NewGuid().ToString();
       this.email = email;
 }
Ejemplo n.º 13
0
 public SimpleParserPage(string url, IEnumerable<IPrepareContent> contentPreparers, IHttpWeb webClient)
     : base(contentPreparers, webClient, url)
 {
 }
Ejemplo n.º 14
0
 public AvitoPhones()
 {
     httpWeb = new WebCl();
 }
Ejemplo n.º 15
0
 public AvitoPhones(IHttpWeb httpWeb)
 {
     this.httpWeb = httpWeb;
 }
Ejemplo n.º 16
0
 public ParserPage(IEnumerable<IPrepareContent> contentPreparers, IHttpWeb httWeb, string url)
     : this(contentPreparers, httWeb)
 {
     PageUrl = url;
 }
Ejemplo n.º 17
0
 public ParserPage(IEnumerable<IPrepareContent> contentPreparers, IHttpWeb httWeb)
 {
     this.contentPreparers = contentPreparers;
       httpWeb = httWeb;
 }
Ejemplo n.º 18
0
 public WebClDecoratorBase(IHttpWeb _component)
 {
     this._component = _component;
 }
Ejemplo n.º 19
0
 public CookieDecorator(IHttpWeb component)
     : base(component)
 {
     cookieContainerCl = new CookieContainer();
 }
 public AvitoLoadImageCutWatermark(IHttpWeb httpweb, string pathFolder, Func<string> GetidImage)
     : base(httpweb, pathFolder)
 {
     this.GetidImage = GetidImage;
 }
 public AvitoLoadLinksBeforeRepeat(IHttpWeb httpWeb, int limitLink, Func<int, bool> IsNewAd)
     : base(httpWeb)
 {
     limitLinks = limitLink;
       this.IsNewAd = IsNewAd;
 }
 public AvitoLoadLinksFromSection(IHttpWeb httpWeb)
 {
     this.httpWeb = httpWeb;
 }
 public AvitoLoadLinksSetCount(IHttpWeb httpWeb, int limitLink)
     : base(httpWeb)
 {
     limitLinks = limitLink;
 }