C# Class Quartz.TextToSchedule.Grammars.EnglishGrammarHelper

Inheritance: IGrammarHelper
显示文件 Open project: amazing-andrew/Quartz.TextToSchedule

Public Methods

Method Description
GetAmountValueFromString ( string amount ) : int

Gets the amount value from string.

GetDateTimeFromDateSpec ( string datespec ) : DateTime?

Gets the date time from date spec.

GetDateTimeFromDateSpecAndTime ( string datespec, string time ) : DateTime?

Gets the date time from date spec and time.

GetDayOfWeekFromString ( string dayOfWeekString ) : DayOfWeek

Gets the day of week from string.

GetDayOfWeekValues ( string dayOfWeekSpecs ) : List

Gets the day of week values.

GetDayValue ( string day ) : int

Gets the day value.

GetIntervalUnitValueFromString ( string intervalUnitString ) : IntervalUnit

Gets the time value from string.

GetMonthValue ( string monthName ) : int
GetMonthValues ( string monthSpecs ) : List

Gets the month values.

GetOrdinalValue ( string ordinal ) : Ordinal

Gets the ordinal value.

GetOrdinalValues ( string ordinals ) : List

Gets the ordinal values.

GetTimeFromTimeString ( string time ) : DateTime?

Gets the time from time string.

GetYearValue ( string year ) : int

Gets an individual year value.

Normalize ( string text ) : string

Normalizes the specified text.

Private Methods

Method Description
AddDayOfWeekRangeToList ( DayOfWeek rangeStartValue, DayOfWeek rangeEndValue, List results ) : void
AddMonthRangeToList ( int rangeStartValue, int rangeEndValue, List results ) : void
NormalizeDayOfWeekAndMonthNames ( string s ) : string
NormalizeExtraSpaces ( string s ) : string
NormalizeRangedValues ( string s ) : string
ReplaceNoiseWords ( string s ) : string
ReplaceSpecialStrings ( string s ) : string

Method Details

GetAmountValueFromString() public method

Gets the amount value from string.
public GetAmountValueFromString ( string amount ) : int
amount string The amount.
return int

GetDateTimeFromDateSpec() public method

Gets the date time from date spec.
public GetDateTimeFromDateSpec ( string datespec ) : DateTime?
datespec string The datespec.
return DateTime?

GetDateTimeFromDateSpecAndTime() public method

Gets the date time from date spec and time.
public GetDateTimeFromDateSpecAndTime ( string datespec, string time ) : DateTime?
datespec string The datespec.
time string The time.
return DateTime?

GetDayOfWeekFromString() public method

Gets the day of week from string.
Invalid Day Of Week String
public GetDayOfWeekFromString ( string dayOfWeekString ) : DayOfWeek
dayOfWeekString string The day of week string.
return DayOfWeek

GetDayOfWeekValues() public method

Gets the day of week values.
public GetDayOfWeekValues ( string dayOfWeekSpecs ) : List
dayOfWeekSpecs string The day of week specs.
return List

GetDayValue() public method

Gets the day value.
public GetDayValue ( string day ) : int
day string The day.
return int

GetIntervalUnitValueFromString() public method

Gets the time value from string.
Unknown time value string
public GetIntervalUnitValueFromString ( string intervalUnitString ) : IntervalUnit
intervalUnitString string The time value string.
return IntervalUnit

GetMonthValue() public method

public GetMonthValue ( string monthName ) : int
monthName string
return int

GetMonthValues() public method

Gets the month values.
public GetMonthValues ( string monthSpecs ) : List
monthSpecs string The month specs.
return List

GetOrdinalValue() public method

Gets the ordinal value.
public GetOrdinalValue ( string ordinal ) : Ordinal
ordinal string The ordinal.
return Ordinal

GetOrdinalValues() public method

Gets the ordinal values.
public GetOrdinalValues ( string ordinals ) : List
ordinals string The ordinals.
return List

GetTimeFromTimeString() public method

Gets the time from time string.
timeString is not a valid time
public GetTimeFromTimeString ( string time ) : DateTime?
time string The time.
return DateTime?

GetYearValue() public method

Gets an individual year value.
public GetYearValue ( string year ) : int
year string The year.
return int

Normalize() public method

Normalizes the specified text.
public Normalize ( string text ) : string
text string The text.
return string