IHierarchyItemActiveLocks Property
IT Hit WebDAV Classes Reference Array of item's lock descriptions.
Namespace:
ITHit.WebDAV.Client
Assembly:
ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 5.1.2712
SyntaxLockInfo[] ActiveLocks { get; }
LockInfo[] ActiveLocks { get; }
ReadOnly Property ActiveLocks As LockInfo()
Get
ReadOnly Property ActiveLocks As LockInfo()
Get
property array<LockInfo^>^ ActiveLocks {
array<LockInfo^>^ get ();
}
property array<LockInfo^>^ ActiveLocks {
array<LockInfo^>^ get ();
}
abstract ActiveLocks : LockInfo[] with get
abstract ActiveLocks : LockInfo[] with get
Property Value
Type:
LockInfoArray of
LockInfo objects representing locks.
Remarks
If item has no locks, an empty array is returned.
Examplesstring 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:8080/Products/Sales.txt"));
foreach(LockInfo lockInfo in item.ActiveLocks)
{
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