-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add download method that returns final download status #1020
Conversation
And mark as Obsolete the method that swallows all errors, and does not return status. Fixes googleapis#982.
70f8170
to
ad470ed
Compare
@@ -134,11 +134,19 @@ public override string RestPath | |||
public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; } | |||
|
|||
/// <summary>Synchronously download the media into the given stream.</summary> | |||
[System.Obsolete("This method hides errors; use " + nameof(Download2) + "(), which returns the final download status.")] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
public virtual void Download(System.IO.Stream stream) | ||
{ | ||
MediaDownloader.Download(this.GenerateRequestUri(), stream); | ||
} | ||
|
||
/// <summary>Synchronously download the media into the given stream.</summary> | ||
/// <returns>The final status of the download; including whether the download succeeded or failed.</returns> | ||
public virtual Google.Apis.Download.IDownloadProgress Download2(System.IO.Stream stream) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's entirely possible that I'm being overly cautious about not obsoleting Download
, but...
* Provide synchronous access to default credentials (#1018) Fixes #652 * Validate application name (#1019) Fixes #729. * Add download method that returns final download status (#1020) Fixes #982. * Support range downloads in generated code (#1021) Fixes #981 * Unregister CancellationToken, and fix exception handling on cancellation (#1023) Fixes #1022 * Clarify NET Core support (#1027) Fixes #1025 * Update version v1.26.2 -> v1.27.0 (#1028) * Support JWT validation (#1026) Fixes #920 * Real JWT validation integration test (#1032)
And mark as Obsolete the method that swallows all errors, and does not return status.
Fixes #982