Click or drag to resize

ILockLockAsync Method

IT Hit User File System
Locks this item in the remote storage.

Namespace:  ITHit.FileSystem
Assembly:  ITHit.FileSystem (in ITHit.FileSystem.dll) Version: 8.0.26019.0-Beta+92e3f56e17dbfd6ebbef85925c0684282db3d967
Task LockAsync(
	LockMode lockMode,
	IOperationContext operationContext,
	CancellationToken cancellationToken


Type: ITHit.FileSystemLockMode
Indicates automatic or manual lock.
Type: ITHit.FileSystemIOperationContext
Provides information about the environment.
Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests.

Return Value

Type: Task
A task object that can be awaited.

This method implementation must lock the item in the remote storage and save the received lock-token on the client. You will supply the lock-token as part of your next server update request in WriteAsync(IFileSystemBasicInfo, Stream, IOperationContext, IInSyncResultContext, CancellationToken) and WriteAsync(IFileSystemBasicInfo, IOperationContext, IInSyncResultContext, CancellationToken).

You must also save the lock mode to be returned from GetLockModeAsync(IOperationContext, CancellationToken) method when requested by the Engine.

See Also