C# Class BrightIdeasSoftware.DateTimeClusteringStrategy

This class implements a strategy where the model objects are clustered according to some portion of the datetime value in the configured column.
To create a strategy that grouped people who were born in the same month, you would create a strategy that extracted just the month, and formatted it to show just the month's name. Like this:
Inheritance: BrightIdeasSoftware.ClusteringStrategy
Show file Open project: tvoyle/ObjectListViewRepack

Public Methods

Method Description
DateTimeClusteringStrategy ( ) : System

Create a strategy that clusters by month/year

DateTimeClusteringStrategy ( DateTimePortion portions, string format ) : System

Create a strategy that clusters around the given parts

GetClusterDisplayLabel ( ICluster cluster ) : string

Gets the display label that the given cluster should use

GetClusterKey ( object model ) : object

Get the cluster key by which the given model will be partitioned by this strategy

Protected Methods

Method Description
DateToString ( DateTime dateTime ) : string

Convert the given date into a user presentable string

Method Details

DateTimeClusteringStrategy() public method

Create a strategy that clusters by month/year
public DateTimeClusteringStrategy ( ) : System
return System

DateTimeClusteringStrategy() public method

Create a strategy that clusters around the given parts
public DateTimeClusteringStrategy ( DateTimePortion portions, string format ) : System
portions DateTimePortion
format string
return System

DateToString() protected method

Convert the given date into a user presentable string
protected DateToString ( DateTime dateTime ) : string
dateTime DateTime
return string

GetClusterDisplayLabel() public method

Gets the display label that the given cluster should use
public GetClusterDisplayLabel ( ICluster cluster ) : string
cluster ICluster
return string

GetClusterKey() public method

Get the cluster key by which the given model will be partitioned by this strategy
public GetClusterKey ( object model ) : object
model object
return object