Esempio n. 1
0
 private void HttpProgress_ProgressChanged(object sender, Windows.Web.Http.HttpProgress e)
 {
     var key = (IProgress<Windows.Web.Http.HttpProgress>)sender;
     HttpProgress newProgress = new HttpProgress()
     {
         BytesReceived = e.BytesReceived,
         BytesSent = e.BytesSent,
         Retries = e.Retries,
         Stage = (HttpProgressStage)Enum.Parse(typeof(HttpProgressStage), e.Stage.ToString()),
         TotalBytesToReceive = e.TotalBytesToReceive,
         TotalBytesToSend = e.TotalBytesToSend
     };
     var value = progresses[key];
     value.Report(newProgress);
 }
Esempio n. 2
0
 private void HandleProgress(HttpProgress progress)
 {
     TotalSize = progress.TotalBytesToSend;
     CurrentSize = progress.BytesSent;
 }