WebDavSessionLockAsync Method
IT Hit WebDAV Classes Reference
Locks an item.
Namespace:
ITHit.WebDAV.Client
Assembly:
ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 6.0.4052-Beta
Syntax public Task<LockInfo> LockAsync(
Uri item,
LockScope lockScope,
bool deep,
string owner,
Nullable<TimeSpan> timeout,
IDictionary<string, string> headers = null,
CancellationToken cancellationToken = null
)
Public Function LockAsync (
item As Uri,
lockScope As LockScope,
deep As Boolean,
owner As String,
timeout As Nullable(Of TimeSpan),
Optional headers As IDictionary(Of String, String) = Nothing,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of LockInfo)
public:
Task<LockInfo^>^ LockAsync(
Uri^ item,
LockScope lockScope,
bool deep,
String^ owner,
Nullable<TimeSpan> timeout,
IDictionary<String^, String^>^ headers = nullptr,
CancellationToken cancellationToken = nullptr
)
member LockAsync :
item : Uri *
lockScope : LockScope *
deep : bool *
owner : string *
timeout : Nullable<TimeSpan> *
?headers : IDictionary<string, string> *
?cancellationToken : CancellationToken
(* Defaults:
let _headers = defaultArg headers null
let _cancellationToken = defaultArg cancellationToken null
*)
-> Task<LockInfo>
Parameters
- item
- Type: SystemUri
URI of the item to be locked. - lockScope
- Type: ITHit.WebDAV.ClientLockScope
Scope of the lock. - deep
- Type: SystemBoolean
Whether to lock entire subtree. - owner
- Type: SystemString
Owner of the lock. - timeout
- Type: SystemNullableTimeSpan
TimeOut after which lock expires. - headers (Optional)
- Type: System.Collections.GenericIDictionaryString, String
Request headers. - cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
Propagates notification that operations should be canceled.
Return Value
Type:
TaskLockInfoInstance of
LockInfo with information about the created lock.
Remarks Server can set lock with different timeout than the one that was requested.
See Also