Example #1
0
 private void OnValidationProgressChanged()
 {
     EventHandler<ManifestValidatorProgressChangedEventArgs> handler = this.ValidationProgressChanged;
     if (handler != null)
     {
         lock (_locker)
         {
             var processed = _processed.Count;
             var remaining = _remaining.Count;
             var passed = _results.Count(obj => obj.IsValidHash);
             var failed = _results.Count(obj => !obj.IsValidHash);
             var e = new ManifestValidatorProgressChangedEventArgs(processed, remaining, passed, failed);
             handler(this, e);
         }
     }
 }
Example #2
0
 private static void OnValidationProgressChanged(object sender, ManifestValidatorProgressChangedEventArgs e)
 {
     if (e.PercentageComplete - 0.1D > lastProgressReportPercentage)
     {
         Console.WriteLine("{0:P2}", e.PercentageComplete);
         lastProgressReportPercentage = e.PercentageComplete;
     }
 }