SyncScope

Ecng.Common

A lightweight synchronization scope that enters a lock on construction and exits on dispose.

Конструкторы

SyncScope
public SyncScope(Lock lock)
syncScope = SyncScope(lock)

Creates a new synchronization scope and enters the provided Lock.

lock
The typed Lock to enter.
SyncScope
public SyncScope(object syncRoot)
syncScope = SyncScope(syncRoot)

Initializes a new synchronization scope and enters the provided synchronization object.

syncRoot
Synchronization object. If it's a Lock, EnterScope is used; otherwise, Object) is used.

Методы

Dispose
public void Dispose()
syncScope.Dispose()

Exits the lock acquired in the constructor.