public AvitoLoadLinksBeforeDate(IHttpWeb httpWeb, DateTime date, int maxWrongDate) : base(httpWeb) { this.maxWrongDate = maxWrongDate; this.date = date; LoadMonth(); }
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); }
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(); }
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 + "'"); } } }
public IrrLoadLinks(IHttpWeb httpWeb) { this.httpWeb = httpWeb; }
public IrrLoadLinksLimitPage(IHttpWeb webCl, int limitPage) : base(webCl) { }
public AvitoSendMessageToOwner(IHttpWeb webCl) { WebCl = webCl; }
public IrrPhone() { httpWeb = new WebCl(); }
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; }
public SimpleParserPage(string url, IEnumerable<IPrepareContent> contentPreparers, IHttpWeb webClient) : base(contentPreparers, webClient, url) { }
public AvitoPhones() { httpWeb = new WebCl(); }
public AvitoPhones(IHttpWeb httpWeb) { this.httpWeb = httpWeb; }
public ParserPage(IEnumerable<IPrepareContent> contentPreparers, IHttpWeb httWeb, string url) : this(contentPreparers, httWeb) { PageUrl = url; }
public ParserPage(IEnumerable<IPrepareContent> contentPreparers, IHttpWeb httWeb) { this.contentPreparers = contentPreparers; httpWeb = httWeb; }
public WebClDecoratorBase(IHttpWeb _component) { this._component = _component; }
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; }