C# Class Cinchcast.Roque.Triggers.Schedule

Creates Schedules for ScheduleTrigger, parses cron expressions
Show file Open project: BlogTalkRadio/Roque

Public Methods

Method Description
Create ( string schedule ) : Schedule

Creates a Schedule using cron syntax

GetNextExecution ( System.DateTime lastExecution ) : DateTime?
IsValidExecutionDay ( System.DateTime time ) : bool
IsValidExecutionDay ( byte month, byte day, byte weekDay ) : bool
IsValidExecutionTime ( System.DateTime time ) : bool
IsValidExecutionTime ( byte month, byte day, byte weekDay, byte hour, byte minute ) : bool

Private Methods

Method Description
ByteSet ( ) : HashSet
ByteSet ( string cronset, byte minValue, byte maxValue ) : HashSet
ByteSetRange ( byte from, byte to, byte step = 1 ) : HashSet
Schedule ( HashSet minute, HashSet hour, HashSet dayOfMonth, HashSet monthOfYear, HashSet dayOfWeek ) : System

Method Details

Create() public static method

Creates a Schedule using cron syntax
public static Create ( string schedule ) : Schedule
schedule string
return Schedule

GetNextExecution() public method

public GetNextExecution ( System.DateTime lastExecution ) : DateTime?
lastExecution System.DateTime
return DateTime?

IsValidExecutionDay() public method

public IsValidExecutionDay ( System.DateTime time ) : bool
time System.DateTime
return bool

IsValidExecutionDay() public method

public IsValidExecutionDay ( byte month, byte day, byte weekDay ) : bool
month byte
day byte
weekDay byte
return bool

IsValidExecutionTime() public method

public IsValidExecutionTime ( System.DateTime time ) : bool
time System.DateTime
return bool

IsValidExecutionTime() public method

public IsValidExecutionTime ( byte month, byte day, byte weekDay, byte hour, byte minute ) : bool
month byte
day byte
weekDay byte
hour byte
minute byte
return bool