C# Class WebApplications.Utilities.Scheduling.ScheduleExtensions

Extension methods for scheduling
Mostrar archivo Open project: webappsuk/CoreLibraries

Public Methods

Method Description
Days ( ) : Day

Converts an array of integers into a Day enum.

Days ( this days ) : Day

Converts an enumeration of integers into a Day enum.

Days ( this day ) : IEnumerable

Converts a Day enum into a enumeration of day integers.

GetFirstDayOfWeek ( int year, int week, Calendar calendar = null, CalendarWeekRule calendarWeekRule = CalendarWeekRule.FirstFourDayWeek, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : System.DateTime

Gets the first day of a week.

Hours ( ) : Hour

Converts an array of integers into a Hour enum.

Hours ( this hours ) : Hour

Converts an enumeration of integers into a Hour enum.

Hours ( this hour ) : IEnumerable

Converts a Hour enum into a enumeration of hour integers.

Minutes ( this minute ) : IEnumerable

Converts a Minute enum into a enumeration of minute integers.

Minutes ( ) : Minute

Converts an array of integers into a Minute enum.

Minutes ( this minutes ) : Minute

Converts an enumeration of integers into a Minute enum.

Months ( this month ) : IEnumerable

Converts a Month enum into a enumeration of month integers.

Months ( ) : Month

Converts an array of integers into a Month enum.

Months ( this months ) : Month

Converts an enumeration of integers into a Month enum.

NextValid ( this dateTime, Month month = Month.Every, Week week = Week.Every, Day day = Day.Every, WeekDay weekDay = WeekDay.Every, Hour hour = Hour.Zeroth, Minute minute = Minute.Zeroth, Second second = Second.Zeroth, Calendar calendar = null, CalendarWeekRule calendarWeekRule = CalendarWeekRule.FirstFourDayWeek, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday, bool inclusive = false ) : System.DateTime

Get's the next valid second after the current .

Seconds ( this second ) : IEnumerable

Converts a Second enum into a enumeration of second integers.

Seconds ( ) : Second

Converts an array of integers into a Second enum.

Seconds ( this seconds ) : Second

Converts an enumeration of integers into a Second enum.

WeekDays ( this weekDay ) : IEnumerable

Converts a Month">WeekDay enum into a enumeration of

WeekDays ( ) : WeekDay

Converts an array of DayOfWeek into a WeekDay enum.

WeekDays ( this daysOfWeek ) : WeekDay

Converts an enumeration of DayOfWeek into a WeekDay enum.

WeekNumber ( this dateTime, Calendar calendar = null, CalendarWeekRule calendarWeekRule = CalendarWeekRule.FirstFourDayWeek, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : int

Get's this week for a date.

Weeks ( this week ) : IEnumerable

Converts a Week enum into a enumeration of week integers.

Weeks ( ) : Week

Converts an array of integers into a Week enum.

Weeks ( this weeks ) : Week

Converts an enumeration of integers into a Week enum.

Method Details

Days() public static method

Converts an array of integers into a Day enum.
public static Days ( ) : Day
return Day

Days() public static method

Converts an enumeration of integers into a Day enum.
public static Days ( this days ) : Day
days this The days.
return Day

Days() public static method

Converts a Day enum into a enumeration of day integers.
public static Days ( this day ) : IEnumerable
day this The day.
return IEnumerable

GetFirstDayOfWeek() public static method

Gets the first day of a week.
public static GetFirstDayOfWeek ( int year, int week, Calendar calendar = null, CalendarWeekRule calendarWeekRule = CalendarWeekRule.FirstFourDayWeek, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : System.DateTime
year int The year.
week int The week.
calendar System.Globalization.Calendar The calendar.
calendarWeekRule CalendarWeekRule The calendar week rule.
firstDayOfWeek DayOfWeek The first day of week.
return System.DateTime

Hours() public static method

Converts an array of integers into a Hour enum.
public static Hours ( ) : Hour
return Hour

Hours() public static method

Converts an enumeration of integers into a Hour enum.
public static Hours ( this hours ) : Hour
hours this The hours.
return Hour

Hours() public static method

Converts a Hour enum into a enumeration of hour integers.
public static Hours ( this hour ) : IEnumerable
hour this The hour.
return IEnumerable

Minutes() public static method

Converts a Minute enum into a enumeration of minute integers.
public static Minutes ( this minute ) : IEnumerable
minute this The minute.
return IEnumerable

Minutes() public static method

Converts an array of integers into a Minute enum.
public static Minutes ( ) : Minute
return Minute

Minutes() public static method

Converts an enumeration of integers into a Minute enum.
public static Minutes ( this minutes ) : Minute
minutes this The minutes.
return Minute

Months() public static method

Converts a Month enum into a enumeration of month integers.
public static Months ( this month ) : IEnumerable
month this The month.
return IEnumerable

Months() public static method

Converts an array of integers into a Month enum.
public static Months ( ) : Month
return Month

Months() public static method

Converts an enumeration of integers into a Month enum.
public static Months ( this months ) : Month
months this The months.
return Month

NextValid() public static method

Get's the next valid second after the current .
public static NextValid ( this dateTime, Month month = Month.Every, Week week = Week.Every, Day day = Day.Every, WeekDay weekDay = WeekDay.Every, Hour hour = Hour.Zeroth, Minute minute = Minute.Zeroth, Second second = Second.Zeroth, Calendar calendar = null, CalendarWeekRule calendarWeekRule = CalendarWeekRule.FirstFourDayWeek, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday, bool inclusive = false ) : System.DateTime
dateTime this The date time (fractions of a second are removed).
month Month The month.
week Week The week.
day Day The day.
weekDay WeekDay The week day.
hour Hour The hour.
minute Minute The minute.
second Second The second.
calendar System.Globalization.Calendar The calendar.
calendarWeekRule CalendarWeekRule The calendar week rule.
firstDayOfWeek DayOfWeek The first day of week.
inclusive bool if set to true can return the time specified, otherwise, starts at the next second..
return System.DateTime

Seconds() public static method

Converts a Second enum into a enumeration of second integers.
public static Seconds ( this second ) : IEnumerable
second this The second.
return IEnumerable

Seconds() public static method

Converts an array of integers into a Second enum.
public static Seconds ( ) : Second
return Second

Seconds() public static method

Converts an enumeration of integers into a Second enum.
public static Seconds ( this seconds ) : Second
seconds this The seconds.
return Second

WeekDays() public static method

Converts a Month">WeekDay enum into a enumeration of
public static WeekDays ( this weekDay ) : IEnumerable
weekDay this The week day.
return IEnumerable

WeekDays() public static method

Converts an array of DayOfWeek into a WeekDay enum.
public static WeekDays ( ) : WeekDay
return WeekDay

WeekDays() public static method

Converts an enumeration of DayOfWeek into a WeekDay enum.
public static WeekDays ( this daysOfWeek ) : WeekDay
daysOfWeek this The weekDays.
return WeekDay

WeekNumber() public static method

Get's this week for a date.
public static WeekNumber ( this dateTime, Calendar calendar = null, CalendarWeekRule calendarWeekRule = CalendarWeekRule.FirstFourDayWeek, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : int
dateTime this The date time.
calendar System.Globalization.Calendar The calendar.
calendarWeekRule CalendarWeekRule The calendar week rule.
firstDayOfWeek DayOfWeek The first day of week.
return int

Weeks() public static method

Converts a Week enum into a enumeration of week integers.
public static Weeks ( this week ) : IEnumerable
week this The week.
return IEnumerable

Weeks() public static method

Converts an array of integers into a Week enum.
public static Weeks ( ) : Week
return Week

Weeks() public static method

Converts an enumeration of integers into a Week enum.
public static Weeks ( this weeks ) : Week
weeks this The weeks.
return Week