C# Класс SDownload.Framework.Streams.BaseStream

Base stream that defines the flow the program follows for downloading a stream. This class can be overridden to provide specific functionality for a certain type of stream.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
Extras List
MainResource DownloadItem
View InfoReportProxy

Открытые методы

Метод Описание
Download ( bool ignoreExtras = false ) : Task

Downloads the Sound representation and any extra files that accompany it If true, extra files will not be downloaded. (Useful for retrying the main download) A boolean value representing if the download was successful or not

Finish ( bool close = true ) : bool

Called once the whole process is finished. Clears any log data and closes the connection to the view. If this method is overridden, base.Finish() should be called AT THE END of the function.

Validate ( ) : Task

Validates the download. The base stream does not do any validation.

Защищенные методы

Метод Описание
BaseStream ( String url, InfoReportProxy view ) : System

Creates a base stream that downloads from a remote url

GenerateRandomString ( int size ) : String

Generate a random string of a given length

GetCleanFileName ( string value ) : string

Get the clean filename for a title

Приватные методы

Метод Описание
DownloadExtra ( DownloadItem item ) : System.Threading.Tasks.Task

Asynchronous method for downloading an item that does not track progress

Описание методов

BaseStream() защищенный Метод

Creates a base stream that downloads from a remote url
protected BaseStream ( String url, InfoReportProxy view ) : System
url String The url to process
view InfoReportProxy The view to report information back to
Результат System

Download() публичный Метод

Downloads the Sound representation and any extra files that accompany it If true, extra files will not be downloaded. (Useful for retrying the main download) A boolean value representing if the download was successful or not
public Download ( bool ignoreExtras = false ) : Task
ignoreExtras bool
Результат Task

Finish() публичный Метод

Called once the whole process is finished. Clears any log data and closes the connection to the view. If this method is overridden, base.Finish() should be called AT THE END of the function.
public Finish ( bool close = true ) : bool
close bool
Результат bool

GenerateRandomString() защищенный статический Метод

Generate a random string of a given length
protected static GenerateRandomString ( int size ) : String
size int Length of the string
Результат String

GetCleanFileName() защищенный статический Метод

Get the clean filename for a title
protected static GetCleanFileName ( string value ) : string
value string The title of the song
Результат string

Validate() публичный Метод

Validates the download. The base stream does not do any validation.
public Validate ( ) : Task
Результат Task

Описание свойств

Extras защищенное свойство

A list of extras that need to be downloaded with the main resource
protected List Extras
Результат List

MainResource защищенное свойство

The main resource that needs to be downloaded
protected DownloadItem MainResource
Результат DownloadItem

View защищенное свойство

The view to report progress back to
protected InfoReportProxy View
Результат InfoReportProxy