/// <summary>Synchronously download a range of the media into the given stream.</summary> public virtual Google.Apis.Download.IDownloadProgress DownloadRange(System.IO.Stream stream, System.Net.Http.Headers.RangeHeaderValue range) { var mediaDownloader = new Google.Apis.Download.MediaDownloader(Service); mediaDownloader.Range = range; return(mediaDownloader.Download(this.GenerateRequestUri(), stream)); }
/// <summary>Constructs a new Download request.</summary> public DownloadRequest(Google.Apis.Services.IClientService service, string resourceName) : base(service) { ResourceName = resourceName; MediaDownloader = new Google.Apis.Download.MediaDownloader(service); InitParameters(); }
/// <summary>Constructs a new Get request.</summary> public GetRequest(Google.Apis.Services.IClientService service, string surveyUrlId) : base(service) { SurveyUrlId = surveyUrlId; MediaDownloader = new Google.Apis.Download.MediaDownloader(service); InitParameters(); }
/// <summary>Asynchronously download a range of the media into the given stream.</summary> public virtual System.Threading.Tasks.Task <Google.Apis.Download.IDownloadProgress> DownloadRangeAsync(System.IO.Stream stream, System.Net.Http.Headers.RangeHeaderValue range, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var mediaDownloader = new Google.Apis.Download.MediaDownloader(Service); mediaDownloader.Range = range; return(mediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken)); }
/// <summary>Constructs a new Search request.</summary> public SearchRequest(Google.Apis.Services.IClientService service) : base(service) { MediaDownloader = new Google.Apis.Download.MediaDownloader(service); InitParameters(); }