/// <summary>
        /// Gets the active locked webdav resources.
        /// </summary>
        /// <returns></returns>
        public static IEnumerable<WebDavLockInfo> GetActiveLocksInfo()
        {
            WebDavAbstractFactory factory = new WebDavAbstractFactory();
            foreach (WebDavStorageElementPropertiesRow row in WebDavStorageElementPropertiesRow.List())
            {
                WebDavElementStorageProvider provider = factory.Create<WebDavElementStorageProvider>(row.ObjectTypeId);
                ResourceInfo resInfo = GetResourceInfoFromPropertyRow(row);
                if (resInfo != null)
                {
                    foreach (ActiveLockElement activeLockEl in provider.GetActiveLocks(resInfo))
                    {
                        OpaqueLockToken lockToken = OpaqueLockToken.Parse(activeLockEl.LockToken.InnerText);
                        McLockElement mcLockEl = GetMcLockElement(lockToken, provider.GetProperties(resInfo));

                        WebDavLockInfo retval = new WebDavLockInfo();
                        retval.WebDavElementPropertyId = row.PrimaryKeyId.Value;
                        retval.FileName = resInfo.Name;
                        retval.ContentTypeId = ContentTypeResolver.GetContentTypeId(resInfo.ContentType);
                        retval.StartLocking = new DateTime(mcLockEl.CreationDate * TimeSpan.TicksPerSecond);
                        retval.Duration = DateTime.UtcNow - retval.StartLocking;
                        UserLight user = UserLight.Load(activeLockEl.Owner);
                        if (user != null)
                        {
                            retval.LockedBy = user.DisplayName;
                        }
                        else
                        {
                            retval.LockedBy = "Unknow";
                        }

                        yield return retval;
                    }
                }
            }
        }
        /// <summary>
        /// Gets the active locked webdav resources.
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <WebDavLockInfo> GetActiveLocksInfo()
        {
            WebDavAbstractFactory factory = new WebDavAbstractFactory();

            foreach (WebDavStorageElementPropertiesRow row in WebDavStorageElementPropertiesRow.List())
            {
                WebDavElementStorageProvider provider = factory.Create <WebDavElementStorageProvider>(row.ObjectTypeId);
                ResourceInfo resInfo = GetResourceInfoFromPropertyRow(row);
                if (resInfo != null)
                {
                    foreach (ActiveLockElement activeLockEl in provider.GetActiveLocks(resInfo))
                    {
                        OpaqueLockToken lockToken = OpaqueLockToken.Parse(activeLockEl.LockToken.InnerText);
                        McLockElement   mcLockEl  = GetMcLockElement(lockToken, provider.GetProperties(resInfo));

                        WebDavLockInfo retval = new WebDavLockInfo();
                        retval.WebDavElementPropertyId = row.PrimaryKeyId.Value;
                        retval.FileName      = resInfo.Name;
                        retval.ContentTypeId = ContentTypeResolver.GetContentTypeId(resInfo.ContentType);
                        retval.StartLocking  = new DateTime(mcLockEl.CreationDate * TimeSpan.TicksPerSecond);
                        retval.Duration      = DateTime.UtcNow - retval.StartLocking;
                        UserLight user = UserLight.Load(activeLockEl.Owner);
                        if (user != null)
                        {
                            retval.LockedBy = user.DisplayName;
                        }
                        else
                        {
                            retval.LockedBy = "Unknow";
                        }

                        yield return(retval);
                    }
                }
            }
        }