Example #1
0
 public bool TryGetProgressRecord(out ProgressRecord record)
 {
     record = null;
     lock (thisLock)
     {
         if (HasProgess())
         {
             record = Progress();
             return true;
         }
     }
     return false;
 }
Example #2
0
 ProgressRecord Progress()
 {
     double computeAvg = ThrougputStats.ComputeAvg(ThroughputMBs());
     double avtThroughputMbps = 8.0 * computeAvg;
     double remainingSeconds = (RemainingMB() / computeAvg);
     var pr = new ProgressRecord
     {
         PercentComplete = PercentComplete(),
         AvgThroughputMbPerSecond = avtThroughputMbps,
         RemainingTime = TimeSpan.FromSeconds(remainingSeconds)
     };
     return pr;
 }
Example #3
0
 public void ProgressUploadStatus(ProgressRecord record)
 {
     ProgressUploadStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime);
 }
Example #4
0
 public void ProgressUploadStatus(ProgressRecord record)
 {
     ProgressUploadStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime);
 }