Namespace: ITHit.WebDAV.Client
[Missing <param name="lockToken"/> documentation for "M:ITHit.WebDAV.Client.IHierarchyItemAsync.UnlockAsync(System.String)"]
[Missing <returns> documentation for "M:ITHit.WebDAV.Client.IHierarchyItemAsync.UnlockAsync(System.String)"]
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... WebDavSessionAsync session = new WebDavSessionAsync(license); session.Credentials = new NetworkCredential("User1", "pwd"); IHierarchyItemAsync item = await session.OpenFileAsync(new Uri("http://server:8580/Products/Sales.txt")); IFolderAsync destFolder = await session.OpenFolderAsync(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);