Interface IMediaDownloader
Media download which uses download file part by part, by ChunkSize.
Assembly: Google.Apis.dll
public interface IMediaDownloader
Properties
Gets or sets the chunk size to download, it defines the size of each part.
Declaration
int ChunkSize { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Downloads synchronously the given URL to the given stream.
Declaration
IDownloadProgress Download(string url, Stream stream)
Parameters
Type |
Name |
Description |
System.String |
url |
|
System.IO.Stream |
stream |
|
Returns
Downloads asynchronously the given URL to the given stream.
Declaration
Task<IDownloadProgress> DownloadAsync(string url, Stream stream)
Parameters
Type |
Name |
Description |
System.String |
url |
|
System.IO.Stream |
stream |
|
Returns
Downloads asynchronously the given URL to the given stream. This download method supports a cancellation
token to cancel a request before it was completed.
Declaration
Task<IDownloadProgress> DownloadAsync(string url, Stream stream, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
url |
|
System.IO.Stream |
stream |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Events
An event which notifies when the download status has been changed.
Declaration
event Action<IDownloadProgress> ProgressChanged
Event Type