private void DownloadProgress(Google.Apis.Download.IDownloadProgress progress) { switch (progress.Status) { case Google.Apis.Download.DownloadStatus.Completed: Messenger.Default.Send(new NotificationMessage("DatabaseDownloadComplete")); break; case Google.Apis.Download.DownloadStatus.Failed: Messenger.Default.Send(new NotificationMessage("DatabaseDownloadFailed")); break; } }
public void DownloadFile(string fileId, ref Stream stream) { Google.Apis.Download.IDownloadProgress result = driveService.Files.Export(fileId, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet").DownloadWithStatus(stream); Console.WriteLine(result); }