Exemplo n.º 1
0
 internal virtual void OnPSProgressChanged(ProgressReportEventArgs e)
 {
     if (this.PSProgressChanged != null)
     {
         this.PSProgressChanged(this, e);
     }
 }
Exemplo n.º 2
0
 public void CalculateProgress(ProgressReportEventArgs e)
 {
     lock (this.ProgressRecord.SyncRoot)
     {
         this.CalculateProgressImpl(e);
     }
 }
Exemplo n.º 3
0
 private void Activity_ProgressChanged(object sender, ProgressReportEventArgs e)
 {
     if (this.ProgressChanged != null)
     {
         e.Percent = this.ProgressPercent;
         this.ProgressChanged(this, e);
     }
 }
 public override void CalculateProgressImpl(ProgressReportEventArgs e)
 {
     DDIHelper.Trace("In CalculateProgress: " + e.Percent);
     base.ProgressRecord.Percent = e.Percent;
     base.ProgressRecord.Status  = e.Status;
     if (e.Errors != null)
     {
         base.ProgressRecord.Errors = ((base.ProgressRecord.Errors == null) ? e.Errors.ToArray <ErrorRecord>() : base.ProgressRecord.Errors.Concat(e.Errors.ToArray <ErrorRecord>() ?? new ErrorRecord[0]).ToArray <ErrorRecord>());
     }
 }
Exemplo n.º 5
0
 public override void CalculateProgressImpl(ProgressReportEventArgs e)
 {
     this.totalReceivedEvents++;
     if (e.Errors != null && e.Errors.Count > 0)
     {
         base.ProgressRecord.FailedCount = 1;
         base.ProgressRecord.Errors      = ((base.ProgressRecord.Errors == null) ? e.Errors.ToArray <ErrorRecord>() : base.ProgressRecord.Errors.Concat(e.Errors.ToArray <ErrorRecord>() ?? new ErrorRecord[0]).ToArray <ErrorRecord>());
     }
     if (this.totalReceivedEvents <= base.ProgressRecord.MaxCount)
     {
         base.ProgressRecord.Percent = this.totalReceivedEvents * 100 / base.ProgressRecord.MaxCount;
     }
 }
Exemplo n.º 6
0
 public override void CalculateProgressImpl(ProgressReportEventArgs e)
 {
     if (e.Errors == null || e.Errors.Count == 0)
     {
         base.ProgressRecord.SucceededCount++;
     }
     else
     {
         base.ProgressRecord.FailedCount++;
         base.ProgressRecord.Errors = ((base.ProgressRecord.Errors == null) ? e.Errors.ToArray <ErrorRecord>() : base.ProgressRecord.Errors.Concat(e.Errors.ToArray <ErrorRecord>() ?? new ErrorRecord[0]).ToArray <ErrorRecord>());
     }
     base.ProgressRecord.Percent = (base.ProgressRecord.SucceededCount + base.ProgressRecord.FailedCount) * 100 / base.ProgressRecord.MaxCount;
 }
Exemplo n.º 7
0
 internal void OnPSProgressReport(ProgressReportEventArgs e)
 {
     this.ProgressPercent = e.Percent;
     this.OnPSProgressChanged(e);
 }
Exemplo n.º 8
0
 public abstract void CalculateProgressImpl(ProgressReportEventArgs e);