Web client that preserves cookies (needed for Google Drive) Return ( int) ( ( ( double) BytesReceived / TotalBytesToReceive ) * 100 ) Public long BytesReceived, TotalBytesToReceive Custom download progress reporting (needed for Google Drive) ![]() Public delegate void DownloadProgressChangedEventHandler( object sender, DownloadProgress progress ) Private const int GOOGLE_DRIVE_MAX_DOWNLOAD_ATTEMPT = 3 an NID cookie is returned instead of a download_warning cookie In the worst case, it is necessary to send 3 download requests to the Drive address Private const string GOOGLE_DRIVE_DOMAIN2 = " " ![]() Private const string GOOGLE_DRIVE_DOMAIN = " " Public class FileDownloader : IDisposable This callback is triggered for both DownloadFile and DownloadFileAsyncįileDownloader.DownloadFileCompleted += ( sender, e ) => Console.WriteLine( "Download completed" ) ![]() This callback is triggered for DownloadFileAsync onlyįileDownloader.DownloadProgressChanged += ( sender, e ) => Console.WriteLine( "Progress changed " + e.BytesReceived + " " + e.TotalBytesToReceive ) FileDownloader fileDownloader = new FileDownloader()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |