C# Класс Nexus.Client.Updating.UpdaterBase

Provides a base implementation of IUpdater.
It is recommended that all updaters derivce from this base class. This class provides helper methods for downloading files, and publishing the status of the update.
Наследование: ObservableObject, IUpdater
Показать файл Открыть проект

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

Метод Описание
Cancel ( ) : void

Cancels the update.

Update ( ) : bool

Performs the update.

UpdaterBase ( IEnvironmentInfo p_eifEnvironmentInfo ) : System

A simple constructor that initializes the object with the given values.

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

Метод Описание
DownloadFile ( Uri p_uriUrl ) : string

Downloads the specified file, and returns the local path where the file was saved.

DownloadFileContents ( Uri p_uriUrl ) : byte[]

Downloads the specified file, and returns the file contents.

DownloadFileContentsAsString ( Uri p_uriUrl ) : string

Downloads the specified file, and returns the file contents as a string.

SetMessage ( string p_strMessage ) : void

Sets the updater's Message.

SetProgress ( Int32 p_intProgress ) : void

Sets the updater's Progress.

SetProgressMaximum ( Int32 p_intMaximum ) : void

Sets the updater's ProgressMaximum.

SetRequiresRestart ( bool p_booRequiresRestart ) : void

Sets the updater's RequiresRestart.

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

Метод Описание
DefaultConfirm ( string p_strMessage, string p_strTitle ) : bool

The default confirm method.

Downloader_DownloadComplete ( object sender, CompletedDownloadEventArgs e ) : void

Handles the FileDownloader.DownloadComplete event of the file downloader.

This stops the updating of the progress properties.

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

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

Cancels the update.
public Cancel ( ) : void
Результат void

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

Downloads the specified file, and returns the local path where the file was saved.
protected DownloadFile ( Uri p_uriUrl ) : string
p_uriUrl System.Uri The URL of the file to download.
Результат string

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

Downloads the specified file, and returns the file contents.
protected DownloadFileContents ( Uri p_uriUrl ) : byte[]
p_uriUrl System.Uri The URL of the file to download.
Результат byte[]

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

Downloads the specified file, and returns the file contents as a string.
protected DownloadFileContentsAsString ( Uri p_uriUrl ) : string
p_uriUrl System.Uri The URL of the file to download.
Результат string

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

Sets the updater's Message.
protected SetMessage ( string p_strMessage ) : void
p_strMessage string The updater's new message.
Результат void

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

Sets the updater's Progress.
protected SetProgress ( Int32 p_intProgress ) : void
p_intProgress System.Int32 The updater's new progress.
Результат void

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

Sets the updater's ProgressMaximum.
protected SetProgressMaximum ( Int32 p_intMaximum ) : void
p_intMaximum System.Int32 The new maximum to use for the updater's progress.
Результат void

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

Sets the updater's RequiresRestart.
protected SetRequiresRestart ( bool p_booRequiresRestart ) : void
p_booRequiresRestart bool The updater's new requires restart value.
Результат void

Update() публичный абстрактный Метод

Performs the update.
public abstract Update ( ) : bool
Результат bool

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

A simple constructor that initializes the object with the given values.
public UpdaterBase ( IEnvironmentInfo p_eifEnvironmentInfo ) : System
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
Результат System