public PartUploadProgressChangedArgs(UploadPartRequest req,UploadPartProgressArgs e)
 {
     PartNumber = req.PartNumber;
     PercentDone = e.PercentDone;
     TotalBytes = e.TotalBytes;
     TransferredBytes = e.TransferredBytes;
 }
        private void uploadPartProgressEventCallback(object sender, UploadPartProgressArgs e)
        {
            lock (this.COUNTER_LOCK)
            {
                this._totalTransferredBytes += e.IncrementTransferred;
            }

            this._fileTransporterRequest.OnRaiseProgressEvent(e.IncrementTransferred, this._totalTransferredBytes, this._contentLength);
        }
Beispiel #3
0
        static void ShowProgress(object o, UploadPartProgressArgs args)
        {
            Console.CursorLeft = 0;
            StringBuilder sb = new StringBuilder();
            sb.Append("[");
            int num = args.PercentDone;
            while (num-- > 0)
            {
                sb.Append("=");
            }
            num = 100 - args.PercentDone;
            while (num-- > 0)
            {
                sb.Append(" ");
            }
            sb.Append("]");
            if (args.PercentDone == 100)
            {
                sb.Append("\n");
            }

            Console.Write(sb);
        }