protected override ValidationResult ValidateUrls(IEnumerable<string> urls, IValidatorReportTextWriter writer, string outputPath) { var result = new ValidationResult(); if (urls.Count() > 0) { // Copy the images and CSS files for the HTML documents mResourceCopier.CopyResources(outputPath); } // Process urls foreach (var url in urls) { string fileName = Path.Combine(outputPath, mFileNameGenerator.GenerateFileName(url, "html")); using (var outputStream = mStreamFactory.GetFileStream(fileName, FileMode.Create, FileAccess.Write)) { var report = ValidateUrl(url ,writer, outputStream); AddResultTotals(result, report); // Write the filename to the report report.FileName = Path.GetFileName(fileName); writer.WriteUrlElement(report); } } return result; }
protected override ValidationResult ValidateUrls(IEnumerable<string> urls, IValidatorReportTextWriter writer, string outputPath) { var result = base.ValidateUrls(urls, writer, outputPath); // report total elapsed time mContext.TotalTimeStopwatch.Stop(); ReportTotalElapsedTime(writer, mContext.TotalTimeStopwatch.Elapsed); return result; }
protected override IValidatorReportItem ValidateUrl(string url, IValidatorReportTextWriter writer, Stream outputStream) { // Start stopwatch mStopwatch.Reset(); mStopwatch.Start(); var result = base.ValidateUrl(url, writer, outputStream); // NOTE: this must occur here for the wrapper class to log the correct times mStopwatch.Stop(); // report times to the report this.ReportElapsedTime(result, mStopwatch.Elapsed); return result; }
protected override IValidatorReportItem ValidateUrl(string url, IValidatorReportTextWriter writer, Stream outputStream) { PauseIteration(); return mValidator.ValidateUrl(url, outputStream, OutputFormat.Html); }
protected override IValidatorReportItem ValidateUrl(string url, IValidatorReportTextWriter writer, Stream outputStream) { // Report process start string processName = string.Format("validation for '{0}'", url); this.OutputStartProcess(processName); var report = base.ValidateUrl(url, writer, outputStream); // Report process completed this.OutputEndProcess(processName); return report; }
public new ValidationResult ValidateUrls(IEnumerable<string> urls, IValidatorReportTextWriter writer, string outputPath) { return base.ValidateUrls(urls, writer, outputPath); }
public new Runner.Validators.IValidatorReportItem ValidateUrl(string url, IValidatorReportTextWriter writer, Stream outputStream) { return base.ValidateUrl(url, writer, outputStream); }
protected virtual ValidationResult ValidateUrls(IEnumerable<string> urls, IValidatorReportTextWriter writer, string outputPath) { throw new NotImplementedException(); }
protected abstract IValidatorReportItem ValidateUrl(string url, IValidatorReportTextWriter writer, Stream outputStream);
protected virtual void ReportTotalElapsedTime(IValidatorReportTextWriter writer, TimeSpan elapsed) { var times = ReportElapsedTime(elapsed); writer.WriteElapsedTime(times); }