C# Class AsyncImageAndroid.DownloadManager

We introduce this class to incapsulate net downloading technology. For this particular case we will use WebClient. This class is bad designed because have multiple responsibilities: 1. Download data from net 2. Loggin feature – EventHandler method. With this method you can subscribe on all events and log arguments with timestamp
Afficher le fichier Open project: xamarin/mobile-samples

Private Properties

Свойство Type Description
FetchStorePath string
StoreData System.Threading.Tasks.Task

Méthodes publiques

Méthode Description
DownloadAsync ( string downloadUrl, string fileName ) : Task
EventHandler ( object sender, EventArgs args ) : void
HandleDownloadProgressChanged ( object sender, DownloadProgressChangedEventArgs e ) : void

Private Methods

Méthode Description
FetchStorePath ( string fileName ) : string
StoreData ( byte data, string pathToStore ) : System.Threading.Tasks.Task

Method Details

DownloadAsync() public méthode

public DownloadAsync ( string downloadUrl, string fileName ) : Task
downloadUrl string
fileName string
Résultat Task

EventHandler() public méthode

public EventHandler ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
Résultat void

HandleDownloadProgressChanged() public méthode

public HandleDownloadProgressChanged ( object sender, DownloadProgressChangedEventArgs e ) : void
sender object
e System.Net.DownloadProgressChangedEventArgs
Résultat void