C# Class EPiUtilities.Filters.DateIntervalFilter

A filter which filters pages on whether a certain property is in a given date interval. If the property has no value the page will be removed as well. If you need a "later than" or "earlier than" filter just use DateTime.MaxValue or MinValue as one of the boundaries.
Inheritance: IPageFilter
Mostrar archivo Open project: JohannesOstensjo/EPiUtilities

Public Methods

Method Description
DateIntervalFilter ( System.DateTime fromDate, System.DateTime toDate, string datePropertyName ) : System

Creates a filter that will filter the specified property with the specified date range.

Filter ( PageDataCollection pages ) : void

Filters the collection, removing pages that do not have a value in the correct range for the specified property.

Filter ( object sender, FilterEventArgs e ) : void

Event handler that calls the filter in this filter class.

PageChangedFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter

Returns an instance of DateIntervalFilter that will filter on the page changed property.

PageCreatedFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter

Returns an instance of DateIntervalFilter that will filter on the page created property.

ShouldFilter ( System.PageData page ) : bool

Returns true if the filter will remove this page when filtering a collection.

StartPublishFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter

Returns an instance of DateIntervalFilter that will filter on the start publish property.

StopPublishFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter

Returns an instance of DateIntervalFilter that will filter on the stop publish property.

Method Details

DateIntervalFilter() public method

Creates a filter that will filter the specified property with the specified date range.
public DateIntervalFilter ( System.DateTime fromDate, System.DateTime toDate, string datePropertyName ) : System
fromDate System.DateTime
toDate System.DateTime
datePropertyName string
return System

Filter() public method

Filters the collection, removing pages that do not have a value in the correct range for the specified property.
public Filter ( PageDataCollection pages ) : void
pages PageDataCollection
return void

Filter() public method

Event handler that calls the filter in this filter class.
public Filter ( object sender, FilterEventArgs e ) : void
sender object
e FilterEventArgs
return void

PageChangedFilter() public static method

Returns an instance of DateIntervalFilter that will filter on the page changed property.
public static PageChangedFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter
fromDate System.DateTime
toDate System.DateTime
return DateIntervalFilter

PageCreatedFilter() public static method

Returns an instance of DateIntervalFilter that will filter on the page created property.
public static PageCreatedFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter
fromDate System.DateTime
toDate System.DateTime
return DateIntervalFilter

ShouldFilter() public method

Returns true if the filter will remove this page when filtering a collection.
public ShouldFilter ( System.PageData page ) : bool
page System.PageData
return bool

StartPublishFilter() public static method

Returns an instance of DateIntervalFilter that will filter on the start publish property.
public static StartPublishFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter
fromDate System.DateTime
toDate System.DateTime
return DateIntervalFilter

StopPublishFilter() public static method

Returns an instance of DateIntervalFilter that will filter on the stop publish property.
public static StopPublishFilter ( System.DateTime fromDate, System.DateTime toDate ) : DateIntervalFilter
fromDate System.DateTime
toDate System.DateTime
return DateIntervalFilter