Click or drag to resize

ILock Interface

IT Hit User File System
Represents file of folder that can be locked in the remote storage.

Namespace:  ITHit.FileSystem
Assembly:  ITHit.FileSystem (in ITHit.FileSystem.dll) Version: 8.0.26019.0-Beta+92e3f56e17dbfd6ebbef85925c0684282db3d967
public interface ILock

The ILock type exposes the following members.

Public methodGetLockModeAsync
Gets item lock mode or None if the item is not locked.
Public methodLockAsync
Locks this item in the remote storage.
Public methodUnlockAsync
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(IFileSystemBasicInfo, Stream, IOperationContext, IInSyncResultContext, CancellationToken) and WriteAsync(IFileSystemBasicInfo, 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.

See Also