C# Class CronExpressionDescriptor.ExpressionDescriptor

Converts a Cron Expression into a human readable string
显示文件 Open project: bradyholt/cron-expression-descriptor Class Usage Examples

Public Methods

Method Description
ExpressionDescriptor ( string expression ) : System

Initializes a new instance of the ExpressionDescriptor class

ExpressionDescriptor ( string expression, Options options ) : System

Initializes a new instance of the ExpressionDescriptor class

GetDescription ( DescriptionTypeEnum type ) : string

Generates a human readable string for the Cron Expression

GetDescription ( string expression ) : string

Generates a human readable string for the Cron Expression

GetDescription ( string expression, Options options ) : string

Generates a human readable string for the Cron Expression

Protected Methods

Method Description
FormatTime ( string hourExpression, string minuteExpression ) : string

Given time parts, will contruct a formatted time description

FormatTime ( string hourExpression, string minuteExpression, string secondExpression ) : string

Given time parts, will contruct a formatted time description

GenerateBetweenSegmentDescription ( string betweenExpression, string>.Func getBetweenDescriptionFormat, string>.Func getSingleItemDescription ) : string

Generates the between segment description

GetDayOfMonthDescription ( ) : string

Generates a description for only the DAYOFMONTH portion of the expression

GetDayOfWeekDescription ( ) : string

Generates a description for only the DAYOFWEEK portion of the expression

GetFullDescription ( ) : string

Generates the FULL description

GetHoursDescription ( ) : string

Generates a description for only the HOUR portion of the expression

GetMinutesDescription ( ) : string

Generates a description for only the MINUTE portion of the expression

GetMonthDescription ( ) : string

Generates a description for only the MONTH portion of the expression

GetSecondsDescription ( ) : string

Generates a description for only the SECONDS portion of the expression

GetSegmentDescription ( string expression, string allDescription, string>.Func getSingleItemDescription, string>.Func getIntervalDescriptionFormat, string>.Func getBetweenDescriptionFormat, string>.Func getDescriptionFormat ) : string

Generates the segment description

GetTimeOfDayDescription ( ) : string

Generates a description for only the TIMEOFDAY portion of the expression

TransformCase ( string description, CasingTypeEnum caseType ) : string

Transforms the case of the expression description, based on options

TransformVerbosity ( string description, bool useVerboseFormat ) : string

Transforms the verbosity of the expression description by stripping verbosity from original description

Private Methods

Method Description
GetYearDescription ( ) : string

Generates a description for only the YEAR portion of the expression

Method Details

ExpressionDescriptor() public method

Initializes a new instance of the ExpressionDescriptor class
public ExpressionDescriptor ( string expression ) : System
expression string The cron expression string
return System

ExpressionDescriptor() public method

Initializes a new instance of the ExpressionDescriptor class
public ExpressionDescriptor ( string expression, Options options ) : System
expression string The cron expression string
options Options Options to control the output description
return System

FormatTime() protected method

Given time parts, will contruct a formatted time description
protected FormatTime ( string hourExpression, string minuteExpression ) : string
hourExpression string Hours part
minuteExpression string Minutes part
return string

FormatTime() protected method

Given time parts, will contruct a formatted time description
protected FormatTime ( string hourExpression, string minuteExpression, string secondExpression ) : string
hourExpression string Hours part
minuteExpression string Minutes part
secondExpression string Seconds part
return string

GenerateBetweenSegmentDescription() protected method

Generates the between segment description
protected GenerateBetweenSegmentDescription ( string betweenExpression, string>.Func getBetweenDescriptionFormat, string>.Func getSingleItemDescription ) : string
betweenExpression string
getBetweenDescriptionFormat string>.Func
getSingleItemDescription string>.Func
return string

GetDayOfMonthDescription() protected method

Generates a description for only the DAYOFMONTH portion of the expression
protected GetDayOfMonthDescription ( ) : string
return string

GetDayOfWeekDescription() protected method

Generates a description for only the DAYOFWEEK portion of the expression
protected GetDayOfWeekDescription ( ) : string
return string

GetDescription() public method

Generates a human readable string for the Cron Expression
public GetDescription ( DescriptionTypeEnum type ) : string
type DescriptionTypeEnum Which part(s) of the expression to describe
return string

GetDescription() public static method

Generates a human readable string for the Cron Expression
public static GetDescription ( string expression ) : string
expression string The cron expression string
return string

GetDescription() public static method

Generates a human readable string for the Cron Expression
public static GetDescription ( string expression, Options options ) : string
expression string The cron expression string
options Options Options to control the output description
return string

GetFullDescription() protected method

Generates the FULL description
protected GetFullDescription ( ) : string
return string

GetHoursDescription() protected method

Generates a description for only the HOUR portion of the expression
protected GetHoursDescription ( ) : string
return string

GetMinutesDescription() protected method

Generates a description for only the MINUTE portion of the expression
protected GetMinutesDescription ( ) : string
return string

GetMonthDescription() protected method

Generates a description for only the MONTH portion of the expression
protected GetMonthDescription ( ) : string
return string

GetSecondsDescription() protected method

Generates a description for only the SECONDS portion of the expression
protected GetSecondsDescription ( ) : string
return string

GetSegmentDescription() protected method

Generates the segment description
protected GetSegmentDescription ( string expression, string allDescription, string>.Func getSingleItemDescription, string>.Func getIntervalDescriptionFormat, string>.Func getBetweenDescriptionFormat, string>.Func getDescriptionFormat ) : string
expression string
allDescription string
getSingleItemDescription string>.Func
getIntervalDescriptionFormat string>.Func
getBetweenDescriptionFormat string>.Func
getDescriptionFormat string>.Func
return string

GetTimeOfDayDescription() protected method

Generates a description for only the TIMEOFDAY portion of the expression
protected GetTimeOfDayDescription ( ) : string
return string

TransformCase() protected method

Transforms the case of the expression description, based on options
protected TransformCase ( string description, CasingTypeEnum caseType ) : string
description string The description to transform
caseType CasingTypeEnum The casing type that controls the output casing
return string

TransformVerbosity() protected method

Transforms the verbosity of the expression description by stripping verbosity from original description
protected TransformVerbosity ( string description, bool useVerboseFormat ) : string
description string The description to transform
useVerboseFormat bool
return string