Inheritance: Andover.Domain.Core.Results.ComponentResultBase
示例#1
0
        private void FindItemsWithLotsOfChildren(Sitecore.Data.Items.Item item)
        {
            if (item == null) return;

            if (item.Children.Count >= _contentProviderSettings.MaxChildItemsPerParent)
            {
                var chlidItem = new ItemCounter()
                {
                    Id = item.ID.ToString(),
                    Count = item.Children.Count,
                    IsCountPastThreshold = item.Children.Count > _contentProviderSettings.MaxChildItemsPerParent
                };

                if (_childItemsList == null)
                {
                    _childItemsList = new List<ItemCounter>();
                }
                _childItemsList.Add(chlidItem);
            }
        }
示例#2
0
        private void FindNumberOfVersionsPerItem(Sitecore.Data.Items.Item item)
        {
            if (item == null) return;

            if (item.Versions.Count >= _contentProviderSettings.MaxVersionsPerItem)
            {
                var versionItem = new ItemCounter()
                {
                    Id = item.ID.ToString(),
                    Count = item.Versions.Count,
                    IsCountPastThreshold = item.Versions.Count > _contentProviderSettings.MaxVersionsPerItem
                };

                if (_versionItemsList == null)
                {
                    _versionItemsList = new List<ItemCounter>();
                }
                _versionItemsList.Add(versionItem);
            }
        }