Namespace: ITHit.WebDAV.Client
Task UnlockAsync( string lockToken, IDictionary<string, string> headers = null, CancellationToken cancellationToken = null )
[Missing <returns> documentation for "M:ITHit.WebDAV.Client.IHierarchyItem.UnlockAsync(System.String,System.Collections.Generic.IDictionary{System.String,System.String},System.Threading.CancellationToken)"]
Exception | Condition |
---|---|
PreconditionFailedException | The item is not locked. |
MethodNotAllowedException | The item does not support locking. |
NotFoundException | The item doesn't exist on the server. |
WebDavException | Unexpected error occurred. |
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);