C# Class Platform.AutoLock

An IAutoLock implementation that uses a monitor for the lock.
Inheritance: IAutoLock
Exibir arquivo Open project: platformdotnet/Platform

Public Methods

Method Description
AutoLock ( ) : System

Creates a new AutoLock using the new AutoLock as the monitor for locking.

AutoLock ( object lockObject ) : System

Creates a new AutoLock using the supplied object as the monitor for locking.

Lock ( ) : AutoLock

Locks the current object's monitor.

Unlock ( ) : AutoLock

Unlocks the current object's monitor.

Private Methods

Method Description
IAutoLock ( ) : IAutoLock

Locks the current object's monitor.

IDisposable ( ) : void

Unlocks the current object's monitor.

Method Details

AutoLock() public method

Creates a new AutoLock using the new AutoLock as the monitor for locking.
public AutoLock ( ) : System
return System

AutoLock() public method

Creates a new AutoLock using the supplied object as the monitor for locking.
public AutoLock ( object lockObject ) : System
lockObject object The object for locking
return System

Lock() public method

Locks the current object's monitor.
public Lock ( ) : AutoLock
return AutoLock

Unlock() public method

Unlocks the current object's monitor.
public Unlock ( ) : AutoLock
return AutoLock