Class SelfManager
- Namespace
- ZeroInstall.Commands.Desktop
- Assembly
- 0install.dll
Represents a specific Zero Install instance that is to be deployed, updated or removed.
public class SelfManager : ManagerBase, IDisposable
- Inheritance
-
SelfManager
- Implements
- Inherited Members
Remarks
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 Dispose().
Constructors
SelfManager(string, ITaskHandler, bool, bool)
Creates a new maintenance manager.
public SelfManager(string targetDir, ITaskHandler handler, bool machineWide = false, bool portable = false)
Parameters
targetDir
stringThe full path to the directory containing the Zero Install instance.
handler
ITaskHandlerA callback object used when the user needs to be asked questions or informed about download and IO tasks.
machineWide
boolApply operations machine-wide instead of just for the current user.
portable
boolControls whether the Zero Install instance at
targetDir
should be a portable instance.
Properties
MutexName
The name of the cross-process mutex used to signal that a maintenance operation is currently in progress.
protected override string MutexName { get; }
Property Value
Portable
Controls whether the Zero Install instance at TargetDir should be a portable instance.
public bool Portable { get; }
Property Value
TargetDir
The full path to the directory containing the Zero Install instance.
public string TargetDir { get; }
Property Value
Methods
Deploy(bool)
Runs the deployment process.
public void Deploy(bool libraryMode = false)
Parameters
libraryMode
boolDeploy Zero Install as a library for use by other applications.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.
Remove()
Runs the removal process.
public void Remove()
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.