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
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5

공개 메소드들

메소드 설명
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