C# Class NanoByte.Common.Net.DownloadTask

Abstract base class for tasks that download a file from the web.
Inheritance: NanoByte.Common.Tasks.TaskBase
Datei anzeigen Open project: nano-byte/common

Private Properties

Property Type Description
CreateTargetStream Stream
ReadHeader void

Protected Methods

Method Description
DownloadTask ( Uri source, long bytesTotal = -1 ) : System

Creates a new download task.

Execute ( ) : void

Private Methods

Method Description
CreateTargetStream ( ) : Stream
ReadHeader ( WebResponse response ) : void

Reads the header information in the response and stores it the object properties.

Method Details

DownloadTask() protected method

Creates a new download task.
protected DownloadTask ( Uri source, long bytesTotal = -1 ) : System
source System.Uri The URL the file is to be downloaded from.
bytesTotal long The number of bytes the file to be downloaded is long. The file will be rejected if it does not have this length. -1 if the size is unknown.
return System

Execute() protected method

protected Execute ( ) : void
return void