/// <inheritdoc />
        public override IEnumerable <ContentLocations.IContentLocationInfo> GetLocations()
        {
            var location = new ContentLocationInfo();

            location.ContentType  = typeof(ListItem);
            location.ProviderName = this.ProviderName;

            var listsFilterExpression = this.CompileFilterExpression(ListItemFilterExpression);

            if (!string.IsNullOrEmpty(listsFilterExpression))
            {
                location.Filters.Add(new BasicContentLocationFilter(listsFilterExpression));
            }

            var listItemModel = new ListItemModel()
            {
                FilterExpression            = this.FilterExpression,
                SerializedAdditionalFilters = this.SerializedAdditionalFilters,
                // We need only filter list items.
                SelectionMode = SelectionMode.FilteredItems
            };

            var listItemsFilterExpression = listItemModel.GetFilterExpression();

            if (!string.IsNullOrEmpty(listItemsFilterExpression))
            {
                location.Filters.Add(new BasicContentLocationFilter(listItemsFilterExpression));
            }

            return(new[] { location });
        }
        /// <inheritdoc />
        public override IEnumerable <ContentLocations.IContentLocationInfo> GetLocations()
        {
            var location = new ContentLocationInfo();

            location.ContentType  = typeof(ListItem);
            location.ProviderName = this.ProviderName;
            if (string.IsNullOrEmpty(location.ProviderName))
            {
                location.ProviderName = this.GetManager().Provider.Name;
            }

            string listsFilterExpression;

            switch (this.ContentViewDisplayMode)
            {
            case Telerik.Sitefinity.Web.UI.ContentUI.Enums.ContentViewDisplayMode.Detail:
                location.Filters.Add(this.CompileSingleItemFilterExpression(location.ContentType));

                return(new[] { location });

            case Telerik.Sitefinity.Web.UI.ContentUI.Enums.ContentViewDisplayMode.Automatic:
                listsFilterExpression = this.CompileFilterExpression(ListItemFilterExpression);
                break;

            default:
                return(null);
            }

            if (!string.IsNullOrEmpty(listsFilterExpression))
            {
                location.Filters.Add(new BasicContentLocationFilter(listsFilterExpression));
            }

            var listItemModel = new ListItemModel()
            {
                FilterExpression            = this.FilterExpression,
                SerializedAdditionalFilters = this.SerializedAdditionalFilters,

                // We need only filter list items.
                SelectionMode = SelectionMode.FilteredItems
            };

            var listItemsFilterExpression = listItemModel.GetFilterExpression();

            if (!string.IsNullOrEmpty(listItemsFilterExpression))
            {
                location.Filters.Add(new BasicContentLocationFilter(listItemsFilterExpression));
            }

            return(new[] { location });
        }