Zero Install .NET API 2.20.0
ZeroInstall.Commands.Desktop.SelfManagement.SelfManager Class Reference

Represents a specific Zero Install instance that is to be deployed, updated or removed. More...

Inheritance diagram for ZeroInstall.Commands.Desktop.SelfManagement.SelfManager:

Public Member Functions

 SelfManager (string targetDir, ITaskHandler handler, bool machineWide, bool portable)
 Creates a new maintenance manager. More...
 
void Deploy ()
 Runs the deployment process. More...
 
void Remove ()
 Runs the removal process. More...
 

Static Public Attributes

static readonly int PerformedWindowMessageID = WindowsUtils.RegisterWindowMessage("ZeroInstall.Commands.MaintenanceManager")
 The window message ID (for use with WindowsUtils.BroadcastMessage) that signals that a maintenance operation has been performed.
 

Properties

override string MutexName [get]
 The name of the cross-process mutex used to signal that a maintenance operation is currently in progress.
 
string TargetDir [get]
 The full path to the directory containing the Zero Install instance.
 
bool Portable [get]
 Controls whether the Zero Install instance at TargetDir should be a portable instance.
 

Detailed Description

Represents a specific Zero Install instance that is to be deployed, updated or removed.

To prevent race-conditions there may only be one maintenance class instance active at any given time. This class acquires a mutex upon calling its constructor and releases it upon calling IDisposable.Dispose.

Constructor & Destructor Documentation

◆ SelfManager()

ZeroInstall.Commands.Desktop.SelfManagement.SelfManager.SelfManager ( string  targetDir,
ITaskHandler  handler,
bool  machineWide,
bool  portable 
)
inline

Creates a new maintenance manager.

Parameters
targetDirThe full path to the directory containing the Zero Install instance.
handlerA callback object used when the the user needs to be asked questions or informed about download and IO tasks.
machineWideApply operations machine-wide instead of just for the current user.
portableControls whether the Zero Install instance at targetDir should be a portable instance.

Member Function Documentation

◆ Deploy()

void ZeroInstall.Commands.Desktop.SelfManagement.SelfManager.Deploy ( )
inline

Runs the deployment process.

Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.

◆ Remove()

void ZeroInstall.Commands.Desktop.SelfManagement.SelfManager.Remove ( )
inline

Runs the removal process.

Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.

The documentation for this class was generated from the following files: