ILock Interface |
Namespace: ITHit.FileSystem
The ILock type exposes the following members.
Name | Description | |
---|---|---|
GetLockModeAsync |
Gets item lock mode or None if the item is not locked.
| |
LockAsync |
Locks this item in the remote storage.
| |
UnlockAsync |
Unlocks this item in the remote storage.
|
Lock item in your remote storage in the LockAsync(LockMode, IOperationContext, CancellationToken) method implementation. and save the lock token as well as other lock info received from the remote storage on the client side. You must also save the lock mode passed to LockAsync(LockMode, IOperationContext, CancellationToken) as a paramater.
Supply the lock-token as part of each remote storage update in WriteAsync(IFileMetadata, Stream, IOperationContext, IInSyncResultContext, CancellationToken) and WriteAsync(IFolderMetadata, IOperationContext, IInSyncResultContext, CancellationToken) methods.
Return the saved lock-mode to the engine from your GetLockModeAsync(IOperationContext, CancellationToken) method implementation.
Finally unlock the item and delete all lock information in your UnlockAsync(IOperationContext, CancellationToken) method implementation.