Click or drag to resize

ILockLockAsync Method

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

Namespace:  ITHit.FileSystem.Windows
Assembly:  ITHit.FileSystem.Windows (in ITHit.FileSystem.Windows.dll) Version: 5.6.16274.0-Beta2
Syntax
Task LockAsync(
	LockMode lockMode,
	IOperationContext operationContext = null,
	CancellationToken cancellationToken = null
)

Parameters

lockMode
Type: ITHit.FileSystem.WindowsLockMode
Indicates automatic or manual lock.
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: 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(IFileMetadata, Stream, IOperationContext, IInSyncResultContext, CancellationToken) and WriteAsync(IFolderMetadata, 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