Click or drag to resize

IHierarchyItemUnlock Method

IT Hit WebDAV Classes Reference
Removes the lock.

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax
void Unlock(
	string lockToken
)

Parameters

lockToken
Type: SystemString

[Missing <param name="lockToken"/> documentation for "M:ITHit.WebDAV.Client.IHierarchyItem.Unlock(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 = session.OpenFile(new Uri("http://server:8580/Products/Sales.txt"));
IFolder destFolder = session.OpenFolder(new Uri("http://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