public bool TryGetProgressRecord(out ProgressRecord record)
 {
     record = null;
     lock (thisLock)
     {
         if (HasProgess())
         {
             record = Progress();
             return true;
         }
     }
     return false;
 }
 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;
 }
Beispiel #3
0
 public void ProgressUploadStatus(ProgressRecord record)
 {
     ProgressUploadStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime);
 }
Beispiel #4
0
 public void ProgressUploadStatus(ProgressRecord record)
 {
     ProgressUploadStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime);
 }