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.Windows
Assembly:  ITHit.FileSystem.Windows (in ITHit.FileSystem.Windows.dll) Version: 7.1.23701.0
Task<LockMode> GetLockModeAsync(
	IOperationContext operationContext = null,
	CancellationToken cancellationToken = null


operationContext (Optional)
Type: ITHit.FileSystemIOperationContext
Provides information about the environment.
cancellationToken (Optional)
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.

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