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.
파일 보기 프로젝트 열기: brkastner/SDownload

보호된 프로퍼티들

프로퍼티 타입 설명
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