Click or drag to resize

ILockGetLockModeAsync Method

IT Hit User File System
Gets item lock mode or None if the item is not locked.

Namespace:  ITHit.FileSystem
Assembly:  ITHit.FileSystem (in ITHit.FileSystem.dll) Version: 8.1.26791.0-Beta2
Syntax
Task<LockMode> GetLockModeAsync(
	IOperationContext operationContext,
	CancellationToken cancellationToken
)

Parameters

operationContext
Type: ITHit.FileSystemIOperationContext
Provides information about the environment.
cancellationToken
Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests.

Return Value

Type: TaskLockMode
Lock mode indicating if the item was locked manually or automatically or None if the item is not locked.
Remarks

You will return the lock mode passed to LockAsync(LockMode, IOperationContext, CancellationToken) method from this method implementation.

This method is also used to detect if the item is locked. Return None if the item is not locked. The Engine will call LockAsync(LockMode, IOperationContext, CancellationToken) only if this method returns None. The Engine will unlock the item automatically by calling UnlockAsync(IOperationContext, CancellationToken) after update only if this method returns Auto.

See Also