IClientNotificationsLockAsync Method |
IT Hit User File System
Namespace:
ITHit.FileSystem.Windows
Assembly:
ITHit.FileSystem.Windows (in ITHit.FileSystem.Windows.dll) Version: 8.3.27213.0
Syntax Task<OperationResult> LockAsync(
LockMode lockMode = LockMode.Manual,
CancellationToken cancellationToken = null
)
Function LockAsync (
Optional lockMode As LockMode = LockMode.Manual,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of OperationResult)
Task<OperationResult^>^ LockAsync(
LockMode lockMode = LockMode::Manual,
CancellationToken cancellationToken = nullptr
)
abstract LockAsync :
?lockMode : LockMode *
?cancellationToken : CancellationToken
(* Defaults:
let _lockMode = defaultArg lockMode LockMode.Manual
let _cancellationToken = defaultArg cancellationToken null
*)
-> Task<OperationResult>
Parameters
- lockMode (Optional)
- Type: ITHit.FileSystemLockMode
Indicates automatic or manual lock. - cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests.
Return Value
Type:
TaskOperationResultOperation result, indicating if the operation was successfull and how many items was affected. If operation failed contains reason for the failure.
Exceptions Exception | Condition |
---|
ClientLockFailedException |
Thrown when a file can not be locked. For example when update, lock, unlock operation is in progress.
|
See Also