November Happy Hour will be moved to Thursday December 5th.

Class FilterCount

Filter that only keeps the first x number of pages.

Inheritance
System.Object
FilterCount
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Filters
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public class FilterCount : PageFilterBase, IPageFilter, IContentFilter

Constructors

FilterCount()

Create a new FilterCount filter.

Declaration
public FilterCount()
Remarks

Note that you have to set the Count property before adding this filter.

FilterCount(Int32)

Create a new FilterCount filter and initialize its Count property.

Declaration
public FilterCount(int count)
Parameters
Type Name Description
System.Int32 count

The number of pages to keep.

Properties

Count

Set the number of items that the filer should keep in the list.

Declaration
public int Count { get; set; }
Property Value
Type Description
System.Int32

Methods

Filter(PageDataCollection)

Filters the specified pages.

Declaration
public override void Filter(PageDataCollection pages)
Parameters
Type Name Description
PageDataCollection pages

The pages that should be filtered.

Overrides

ShouldFilter(IContent)

If the content should be filtered.

Declaration
public override bool ShouldFilter(IContent content)
Parameters
Type Name Description
IContent content
Returns
Type Description
System.Boolean

True if the filter will remove the page; otherwise false.

Overrides

ShouldFilter(PageData)

If the page should be filtered.

Declaration
public override bool ShouldFilter(PageData page)
Parameters
Type Name Description
PageData page

The page that you want to check.

Returns
Type Description
System.Boolean

True if the filter will remove the page; otherwise false.

Overrides
Remarks

FilterCount does not support ShouldFilter method.

Implements

Extension Methods