Skip to content
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

Merged
merged 2 commits into from
May 30, 2017

Conversation

chrisdunelm
Copy link
Contributor

And mark as Obsolete the method that swallows all errors, and does not return status.

Fixes #982

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 26, 2017
@chrisdunelm chrisdunelm changed the title Add download method that returns finsl status Add download method that returns final download status May 26, 2017
And mark as Obsolete the method that swallows all errors, and does not return status.

Fixes googleapis#982.
@@ -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.

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.

@chrisdunelm chrisdunelm changed the base branch from master to v127wip May 28, 2017 08:00
Copy link
Collaborator

@jskeet jskeet left a 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...

@chrisdunelm chrisdunelm merged commit fa8e7c3 into googleapis:v127wip May 30, 2017
@chrisdunelm chrisdunelm deleted the downloadreturn branch May 30, 2017 11:57
chrisdunelm added a commit that referenced this pull request Jun 1, 2017
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants