Google API Client Library for .NET  1.10.0
Public Member Functions | Properties | Events | List of all members
Google.Apis.Download.IMediaDownloader Interface Reference

Media download which uses download file part by part, by ChunkSize. More...

Inheritance diagram for Google.Apis.Download.IMediaDownloader:
Google.Apis.Download.MediaDownloader

Public Member Functions

IDownloadProgress Download (string url, Stream stream)
 Downloads synchronously the given URL to the given stream. More...
 
Task< IDownloadProgressDownloadAsync (string url, Stream stream)
 Downloads asynchronously the given URL to the given stream. More...
 
Task< IDownloadProgressDownloadAsync (string url, Stream stream, CancellationToken cancellationToken)
 Downloads asynchronously the given URL to the given stream. This download method supports a cancellation token to cancel a request before it was completed. More...
 

Properties

int ChunkSize [get, set]
 Gets or sets the chunk size to download, it defines the size of each part. More...
 

Events

Action< IDownloadProgressProgressChanged
 An event which notifies when the download status has been changed. More...
 

Detailed Description

Media download which uses download file part by part, by ChunkSize.

Member Function Documentation

IDownloadProgress Google.Apis.Download.IMediaDownloader.Download ( string  url,
Stream  stream 
)

Downloads synchronously the given URL to the given stream.

Implemented in Google.Apis.Download.MediaDownloader.

Task<IDownloadProgress> Google.Apis.Download.IMediaDownloader.DownloadAsync ( string  url,
Stream  stream 
)

Downloads asynchronously the given URL to the given stream.

Implemented in Google.Apis.Download.MediaDownloader.

Task<IDownloadProgress> Google.Apis.Download.IMediaDownloader.DownloadAsync ( string  url,
Stream  stream,
CancellationToken  cancellationToken 
)

Downloads asynchronously the given URL to the given stream. This download method supports a cancellation token to cancel a request before it was completed.

In case the download fails IDownloadProgress.Exception will contain the exception that cause the failure. The only exception which will be thrown is System.Threading.Tasks.TaskCanceledException which indicates that the task was canceled.

Implemented in Google.Apis.Download.MediaDownloader.

Property Documentation

int Google.Apis.Download.IMediaDownloader.ChunkSize
getset

Gets or sets the chunk size to download, it defines the size of each part.

Event Documentation

Action<IDownloadProgress> Google.Apis.Download.IMediaDownloader.ProgressChanged

An event which notifies when the download status has been changed.


The documentation for this interface was generated from the following file: