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