Click or drag to resize

LockInfoTimeOut Field

IT Hit WebDAV Classes Reference
Timeout until lock expires.

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 6.0.4052-Beta
Syntax
public readonly TimeSpan TimeOut

Field Value

Type: TimeSpan
Remarks
TimeSpan.MaxValue means infinity (no expiration).
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"));
LockInfo lockInfo = await item.LockAsync(LockScope.Shared, false, "User 1", TimeSpan.MaxValue);
string timout = lockInfo.TimeOut == TimeSpan.MaxValue ? "Infinite" : lockInfo.TimeOut.TotalSeconds.ToString();
Console.WriteLine(lockInfo.Owner 
    + " " + lockInfo.LockToken.Href 
    + " " + lockInfo.LockToken.LockToken 
    + " " + lockInfo.LockScope 
    + " " + lockInfo.Deep 
    + " " + timout);
See Also