C# Class NAppUpdate.Framework.UpdateManager

An UpdateManager class is a singleton class handling the update process from start to end for a consumer application
显示文件 Open project: synhershko/NAppUpdate Class Usage Examples

Private Properties

Property Type Description
IsAfterRestart bool
TaskProgressCallback void
UpdateManager System

Public Methods

Method Description
Abort ( ) : void

Abort update process, cancelling whatever background process currently taking place without waiting for it to complete

Abort ( bool waitForTermination ) : void

Abort update process, cancelling whatever background process currently taking place

ApplyUpdates ( ) : void

Starts the updater executable and sends update data to it, and relaunch the caller application as soon as its done

ApplyUpdates ( bool relaunchApplication ) : void

Starts the updater executable and sends update data to it

ApplyUpdates ( bool relaunchApplication, bool updaterDoLogging, bool updaterShowConsole ) : void

Starts the updater executable and sends update data to it

BeginCheckForUpdates ( AsyncCallback callback, Object state ) : IAsyncResult

Check for updates asynchronously

BeginPrepareUpdates ( AsyncCallback callback, Object state ) : IAsyncResult

Prepare updates asynchronously

CheckForUpdates ( ) : void

Check for updates synchronously

CleanUp ( ) : void

Delete the temp folder as a whole and fail silently

EndCheckForUpdates ( IAsyncResult asyncResult ) : void

Block until previously-called CheckForUpdates complete

EndPrepareUpdates ( IAsyncResult asyncResult ) : void

Block until previously-called PrepareUpdates complete

PrepareUpdates ( ) : void

Prepare updates synchronously

ReinstateIfRestarted ( ) : void
RollbackUpdates ( ) : void

Rollback executed updates in case of an update failure

Private Methods

Method Description
IsAfterRestart ( ) : bool
TaskProgressCallback ( UpdateProgressInfo currentStatus, IUpdateTask task ) : void
UpdateManager ( ) : System

Method Details

Abort() public method

Abort update process, cancelling whatever background process currently taking place without waiting for it to complete
public Abort ( ) : void
return void

Abort() public method

Abort update process, cancelling whatever background process currently taking place
public Abort ( bool waitForTermination ) : void
waitForTermination bool If true, blocks the calling thread until the current process terminates
return void

ApplyUpdates() public method

Starts the updater executable and sends update data to it, and relaunch the caller application as soon as its done
public ApplyUpdates ( ) : void
return void

ApplyUpdates() public method

Starts the updater executable and sends update data to it
public ApplyUpdates ( bool relaunchApplication ) : void
relaunchApplication bool true if relaunching the caller application is required; false otherwise
return void

ApplyUpdates() public method

Starts the updater executable and sends update data to it
public ApplyUpdates ( bool relaunchApplication, bool updaterDoLogging, bool updaterShowConsole ) : void
relaunchApplication bool true if relaunching the caller application is required; false otherwise
updaterDoLogging bool true if the updater writes to a log file; false otherwise
updaterShowConsole bool true if the updater shows the console window; false otherwise
return void

BeginCheckForUpdates() public method

Check for updates asynchronously
public BeginCheckForUpdates ( AsyncCallback callback, Object state ) : IAsyncResult
callback AsyncCallback Callback function to call when done; can be null
state Object Allows the caller to preserve state; can be null
return IAsyncResult

BeginPrepareUpdates() public method

Prepare updates asynchronously
public BeginPrepareUpdates ( AsyncCallback callback, Object state ) : IAsyncResult
callback AsyncCallback Callback function to call when done; can be null
state Object Allows the caller to preserve state; can be null
return IAsyncResult

CheckForUpdates() public method

Check for updates synchronously
public CheckForUpdates ( ) : void
return void

CleanUp() public method

Delete the temp folder as a whole and fail silently
public CleanUp ( ) : void
return void

EndCheckForUpdates() public method

Block until previously-called CheckForUpdates complete
public EndCheckForUpdates ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

EndPrepareUpdates() public method

Block until previously-called PrepareUpdates complete
public EndPrepareUpdates ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

PrepareUpdates() public method

Prepare updates synchronously
public PrepareUpdates ( ) : void
return void

ReinstateIfRestarted() public method

public ReinstateIfRestarted ( ) : void
return void

RollbackUpdates() public method

Rollback executed updates in case of an update failure
public RollbackUpdates ( ) : void
return void