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.4.27341.0
Syntax
public interface ILock

The ILock type exposes the following members.

Methods
  NameDescription
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.
Top
Remarks

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.

See Also