Click or drag to resize

IHierarchyItemUnlockAsync Method (String)

IT Hit WebDAV Classes Reference
Remove the locks.

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 5.1.2712
Syntax
Task UnlockAsync(
	string lockToken
)

Task UnlockAsync(
	string lockToken
)

Parameters

lockToken
Type: SystemString

[Missing <param name="lockToken"/> documentation for "M:ITHit.WebDAV.Client.IHierarchyItem.UnlockAsync(System.String)"]

Return Value

Type: Task

[Missing <returns> documentation for "M:ITHit.WebDAV.Client.IHierarchyItem.UnlockAsync(System.String)"]

Exceptions
ExceptionCondition
PreconditionFailedExceptionThe item is not locked.
MethodNotAllowedExceptionThe item does not support locking.
NotFoundExceptionThe item doesn't exist on the server.
WebDavExceptionUnexpected error occurred.
Examples
string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");
IHierarchyItem item = await session.GetFileAsync(new Uri("https://server:8580/Products/Sales.txt"));
IFolder destFolder = await session.GetFolderAsync(new Uri("https://server:8580/Info/"));
LockInfo lockInfo = item.Lock(LockScope.Shared, false, "User 1", new TimeSpan(0, 20, 0));
item.CopyTo(destFolder, "Copy of " + item.DisplayName, false, false);
item.Unlock(lockInfo.LockToken.LockToken);
See Also