C# Класс Kudu.Core.Infrastructure.LockFile

Наследование: IOperationLock
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
InitializeAsyncLocks ( ) : void
Lock ( string operationName ) : bool
LockAsync ( string operationName ) : System.Threading.Tasks.Task

Returns a lock right away or waits asynchronously until a lock is available.

LockFile ( string path ) : System
LockFile ( string path, ITraceFactory traceFactory ) : System
Release ( ) : void
TerminateAsyncLocks ( ) : void

Because of a bug in Ninject in how it disposes objects in the global scope for each request we can't use Dispose to shut down the file system watcher. Otherwise this would get disposed on every request.

Защищенные методы

Метод Описание
OnLockAcquired ( ) : void
OnLockRelease ( ) : void

Приватные методы

Метод Описание
DeleteFileSafe ( ) : void
OnLockReleasedInternal ( object sender, FileSystemEventArgs e ) : void

When a lock file change has been detected we check whether there are queued up lock requests. If so then we attempt to get the lock and dequeue the next request.

ReadLockInfo ( ) : OperationLockInfo
TraceIfUnknown ( Exception ex ) : void
WriteLockInfo ( string operationName, Stream lockStream ) : void

Описание методов

InitializeAsyncLocks() публичный Метод

public InitializeAsyncLocks ( ) : void
Результат void

Lock() публичный Метод

public Lock ( string operationName ) : bool
operationName string
Результат bool

LockAsync() публичный Метод

Returns a lock right away or waits asynchronously until a lock is available.
public LockAsync ( string operationName ) : System.Threading.Tasks.Task
operationName string
Результат System.Threading.Tasks.Task

LockFile() публичный Метод

public LockFile ( string path ) : System
path string
Результат System

LockFile() публичный Метод

public LockFile ( string path, ITraceFactory traceFactory ) : System
path string
traceFactory ITraceFactory
Результат System

OnLockAcquired() защищенный Метод

protected OnLockAcquired ( ) : void
Результат void

OnLockRelease() защищенный Метод

protected OnLockRelease ( ) : void
Результат void

Release() публичный Метод

public Release ( ) : void
Результат void

TerminateAsyncLocks() публичный Метод

Because of a bug in Ninject in how it disposes objects in the global scope for each request we can't use Dispose to shut down the file system watcher. Otherwise this would get disposed on every request.
public TerminateAsyncLocks ( ) : void
Результат void