ClassRecurrencePattern
Provides the class for recurrence pattern.
Definition
Namespace:Telerik.Maui.Controls.Scheduler
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RecurrencePattern : NotifyPropertyChangedBase, INotifyPropertyChanged
Inheritance: objectNotifyPropertyChangedBaseRecurrencePattern
Implements:
Inherited Members
Constructors
RecurrencePattern()
Initializes a new instance of the RecurrencePattern class.
Declaration
public RecurrencePattern()
RecurrencePattern(CultureInfo)
Initializes a new instance of the RecurrencePattern class.
Declaration
public RecurrencePattern(CultureInfo culture)
Parameters
culture
The Culture to use when generating dates. By default the class uses InvariantCulture.
RecurrencePattern(int?, RecurrenceDays, RecurrenceFrequency, int, int?, int?)
Initializes a new instance of the RecurrencePattern class.
Declaration
public RecurrencePattern(int? dayOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? monthOfYear, int? dayOrdinal)
Parameters
dayOfMonth
int?
The day of month.
daysOfWeekMask
The days of week mask.
frequency
The frequency.
interval
The interval.
monthOfYear
int?
The month of year.
dayOrdinal
int?
The week of month.
RecurrencePattern(int[], RecurrenceDays, RecurrenceFrequency, int, int?, int[], int[])
Initializes a new instance of the RecurrencePattern class.
Declaration
public RecurrencePattern(int[] daysOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? dayOrdinal, int[] hoursOfDay, int[] minutesOfHour)
Parameters
daysOfMonth
int[]
The days of month.
daysOfWeekMask
The days of week mask.
frequency
The frequency.
interval
The interval.
dayOrdinal
int?
The week of month.
hoursOfDay
int[]
The hours of day.
minutesOfHour
int[]
The minutes of hour.
Properties
DayOrdinal
Gets or sets the day ordinal.
Declaration
public int? DayOrdinal { get; set; }
Property Value
int?
The day ordinal.
DaysOfMonth
Gets or sets the day of month.
Declaration
public int[] DaysOfMonth { get; set; }
Property Value
int[]
The days of month.
DaysOfWeekMask
Gets or sets the days of week mask.
Declaration
public RecurrenceDays DaysOfWeekMask { get; set; }
Property Value
The days of week mask.
FirstDayOfWeek
Gets or sets the day on which the week starts.
Declaration
public DayOfWeek FirstDayOfWeek { get; set; }
Property Value
This property is only meaningful when RecurrenceFrequency is set to Weekly and Interval is greater than 1.
Frequency
Gets or sets the frequency.
Declaration
public RecurrenceFrequency Frequency { get; set; }
Property Value
The frequency.
HoursOfDay
Gets or sets the hours of day.
Declaration
public int[] HoursOfDay { get; set; }
Property Value
int[]
The hours of day.
Interval
Gets or sets the interval.
MaxOccurrences
Optional limit for the number of occurrences. Defaults to no limit (Int32.MaxInt).
MinutesOfHour
Gets or sets the minutes of hour.
Declaration
public int[] MinutesOfHour { get; set; }
Property Value
int[]
The minutes of hour.
MonthOfYear
Gets or sets the month of year.
Declaration
public int? MonthOfYear { get; set; }
Property Value
int?
The month of year.
RecursUntil
Optional end date for the recurring appointment. Defaults to no end date (DateTime.MaxValue).
Declaration
public DateTime? RecursUntil { get; set; }
Property Value
The recurs until.
Methods
Copy()
Deep copies this instance.
Declaration
public RecurrencePattern Copy()
Returns
A deep copy of the current object.
CopyFrom(RecurrencePattern)
Copies from.
Declaration
public void CopyFrom(RecurrencePattern other)
Parameters
other
The other.
Exceptions
Invalid type.
GetFirstOccurrence(DateTime)
Gets the first occurrence.
GetNextDate(DateTime, int)
Gets the next date when the rule can match.
Declaration
protected DateTime GetNextDate(DateTime start, int index)
Parameters
start
index
The index from the start.
Returns
Exceptions
Invalid RecurrenceFrequency.
GetOccurrences(DateTime)
Gets the occurrences.
Declaration
public IEnumerable<DateTime> GetOccurrences(DateTime start)
Parameters
start
The start.
Returns
GetOccurrences(DateTime, DateTime, DateTime)
Gets the occurrences.
Declaration
public IEnumerable<DateTime> GetOccurrences(DateTime start, DateTime from, DateTime to)
Parameters
start
The start.
from
From.
to
To.
Returns
MatchDayOfWeekMask(DateTime, RecurrenceDays)
Matches the day of week mask.
Declaration
protected static bool MatchDayOfWeekMask(DateTime start, RecurrenceDays daysOfWeekMask)
Parameters
start
The start.
daysOfWeekMask
The days of week mask.
Returns
MatchDayOrdinal(DateTime, int?, RecurrenceDays, CultureInfo)
Matches the day ordinal.
Declaration
protected static bool MatchDayOrdinal(DateTime date, int? dayOrdinal, RecurrenceDays daysOfWeekMask, CultureInfo culture = null)
Parameters
date
The date.
dayOrdinal
int?
The day ordinal.
daysOfWeekMask
The days of week mask.
culture
The culture.
Returns
MatchPattern(DateTime, DateTime)
Matches the pattern for a date.
Declaration
protected bool MatchPattern(DateTime start, DateTime dateTime)
Parameters
start
dateTime
The date to match.
Returns
Exceptions
Invalid RecurrenceFrequency.