Class MonitorLock
Provides an equivalent to the c# lock statement, to be used in a using block.
Inheritance
System.Object
Namespace: Umbraco.Core
Assembly: Umbraco.Core.dll
Syntax
public class MonitorLock : IDisposable
Remarks
Ie replace lock (o) {...}
by using (new MonitorLock(o)) { ... }
Constructors
View SourceMonitorLock(Object)
Initializes a new instance of the MonitorLock class with an object to lock.
Declaration
public MonitorLock(object locker)
Parameters
Type | Name | Description |
---|---|---|
System.Object | locker | The object to lock. |
Remarks
Should always be used within a using block.