Метод | Описание | |
---|---|---|
CreateAndEnter ( string key ) : |
Creates a new instance and tries to aquire a lock.
|
|
CreateAndEnter ( string key, System.TimeSpan waitTimeout ) : |
Creates a new instance and tries to aquire a lock.
|
|
CreateAndEnter ( string key, int waitTimeoutMilliseconds ) : |
Creates a new instance and tries to aquire a lock.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Releases aquired lock and related resources.
|
|
Enter ( ) : bool |
Tries to aquire a lock.
|
|
Enter ( System.TimeSpan waitTimeout ) : bool |
Tries to aquire a lock respecting the specified timeout.
|
|
Enter ( int waitTimeoutMilliseconds ) : bool |
Tries to aquire a lock respecting the specified timeout.
|
|
Exit ( ) : bool |
Releases the lock if it was already aquired. Called also at "Dispose".
|
|
NamedLock ( string key ) : System |
Initializes a new instance of the NamedLock class.
|
Метод | Описание | |
---|---|---|
GetOrAdd ( string key ) : object | ||
LockFactory ( string key ) : CountedLock | ||
ReleaseOrRemove ( string key ) : void |
public static CreateAndEnter ( string key ) : |
||
key | string | The named lock key. |
Результат |
public static CreateAndEnter ( string key, System.TimeSpan waitTimeout ) : |
||
key | string | The named lock key. |
waitTimeout | System.TimeSpan | The wait timeout. |
Результат |
public static CreateAndEnter ( string key, int waitTimeoutMilliseconds ) : |
||
key | string | The named lock key. |
waitTimeoutMilliseconds | int | The wait timeout milliseconds. |
Результат |
public Enter ( System.TimeSpan waitTimeout ) : bool | ||
waitTimeout | System.TimeSpan | The wait timeout. |
Результат | bool |
public Enter ( int waitTimeoutMilliseconds ) : bool | ||
waitTimeoutMilliseconds | int | The wait timeout milliseconds. |
Результат | bool |
public NamedLock ( string key ) : System | ||
key | string | The named lock key. |
Результат | System |