/// <summary> /// Add the totals from a <see cref="CompletedDocument"/> message to these stats /// </summary> public CrawlJobStats WithCompleted(CompletedDocument doc) { if (doc.Document.IsImage) { return(Copy(imgDownloaded: ImagesDownloaded + 1, imgBytesDownloaded: ImageBytesDownloaded + doc.NumBytes)); } return(Copy(htmlDownloaded: HtmlDocumentsDownloaded + 1, htmlBytesDownloaded: HtmlBytesDownloaded + doc.NumBytes)); }
/// <summary> /// Add the totals from a <see cref="CompletedDocument"/> message to these stats /// </summary> public CrawlJobStats WithCompleted(CompletedDocument doc) { if (doc.Document.IsImage) { return Copy(imgDownloaded: ImagesDownloaded + 1, imgBytesDownloaded: ImageBytesDownloaded + doc.NumBytes); } return Copy(htmlDownloaded: HtmlDocumentsDownloaded + 1, htmlBytesDownloaded: HtmlBytesDownloaded + doc.NumBytes); }