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.1.26791.0-Beta2
Syntax
Task LockAsync(
	LockMode lockMode,
	IOperationContext operationContext,
	CancellationToken cancellationToken
)

Parameters

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

Return Value

Type: Task
A task object that can be awaited.
Remarks

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