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.Windows
Assembly:  ITHit.FileSystem.Windows (in ITHit.FileSystem.Windows.dll) Version: 3.3.9602.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) 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) as a paramater.

Supply the lock-token as part of each remote storage update in WriteAsync(IFileMetadata, Stream, IOperationContext) and WriteAsync(IFolderMetadata, IOperationContext) methods.

Return the saved lock-mode to the engine from your GetLockModeAsync method implementation.

Finally unlock the item and delete all lock information in your UnlockAsync method implementation.

See Also