Class FilterRemoveNullValues
Filter to remove pages based on Null values for properties.
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.Cms.AspNet.dll
Version: 11.20.7Syntax
public class FilterRemoveNullValues : PageFilterBase, IPageFilter, IContentFilter
Constructors
FilterRemoveNullValues()
Default constructor.
Declaration
public FilterRemoveNullValues()
Remarks
Sets the property name to empty string, i e you need to set the PropertyName property.
FilterRemoveNullValues(String)
Constructor that sets the property name to check.
Declaration
public FilterRemoveNullValues(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Name of the property to check for null values. |
Properties
PropertyName
Name of the property to check for null values.
Declaration
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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
Remarks
Will remove all pages that has Property[PropertyName] set to null.
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. |