C# Class ZeroInstall.Store.ManagerBase

Common base class for managers that need an ITaskHandler and Mutex-based locking.
Inheritance: IDisposable
显示文件 Open project: 0install/0install-win

Protected Properties

Property Type Description
Handler ITaskHandler

Public Methods

Method Description
Dispose ( ) : void

Protected Methods

Method Description
AquireMutex ( ) : void

Tries to aquire a mutex with the name MutexName. Call this at the end of your constructors.

Dispose ( bool disposing ) : void

Releases the mutex.

ManagerBase ( [ handler, bool machineWide = false ) : System

Creates a new manager.

Method Details

AquireMutex() protected method

Tries to aquire a mutex with the name MutexName. Call this at the end of your constructors.
Another process is already holding the mutex.
protected AquireMutex ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

Releases the mutex.
protected Dispose ( bool disposing ) : void
disposing bool true if called manually and not by the garbage collector.
return void

ManagerBase() protected method

Creates a new manager.
protected ManagerBase ( [ handler, bool machineWide = false ) : System
handler [ A callback object used when the the user needs to be asked questions or informed about download and IO tasks.
machineWide bool Apply operations machine-wide instead of just for the current user.
return System

Property Details

Handler protected_oe property

A callback object used when the the user needs to be asked questions or informed about download and IO tasks.
protected ITaskHandler Handler
return ITaskHandler