RecurrencePattern
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
Initializes a new instance of the RecurrencePattern class.
public RecurrencePattern()
Initializes a new instance of the RecurrencePattern class.
public RecurrencePattern(CultureInfo culture)
The Culture to use when generating dates. By default the class uses InvariantCulture.
Initializes a new instance of the RecurrencePattern class.
public RecurrencePattern(int? dayOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? monthOfYear, int? dayOrdinal)
The day of month.
daysOfWeekMaskRecurrenceDaysThe days of week mask.
frequencyRecurrenceFrequencyThe frequency.
intervalintThe interval.
monthOfYearint?The month of year.
dayOrdinalint?The week of month.
Initializes a new instance of the RecurrencePattern class.
public RecurrencePattern(int[] daysOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? dayOrdinal, int[] hoursOfDay, int[] minutesOfHour)
The days of month.
daysOfWeekMaskRecurrenceDaysThe days of week mask.
frequencyRecurrenceFrequencyThe frequency.
intervalintThe interval.
dayOrdinalint?The week of month.
hoursOfDayint[]The hours of day.
minutesOfHourint[]The minutes of hour.
Properties
Gets or sets the day ordinal.
public int? DayOrdinal { get; set; }
The day ordinal.
Gets or sets the day of month.
public int[] DaysOfMonth { get; set; }
The days of month.
Gets or sets the days of week mask.
public RecurrenceDays DaysOfWeekMask { get; set; }
The days of week mask.
Gets or sets the day on which the week starts.
public DayOfWeek FirstDayOfWeek { get; set; }
This property is only meaningful when RecurrenceFrequency is set to Weekly and Interval is greater than 1.
Gets or sets the frequency.
public RecurrenceFrequency Frequency { get; set; }
The frequency.
Gets or sets the hours of day.
public int[] HoursOfDay { get; set; }
The hours of day.
Gets or sets the interval.
public int Interval { get; set; }
The interval.
Optional limit for the number of occurrences. Defaults to no limit (Int32.MaxInt).
public int? MaxOccurrences { get; set; }
Gets or sets the minutes of hour.
public int[] MinutesOfHour { get; set; }
The minutes of hour.
Gets or sets the month of year.
public int? MonthOfYear { get; set; }
The month of year.
Optional end date for the recurring appointment. Defaults to no end date (DateTime.MaxValue).
public DateTime? RecursUntil { get; set; }
The recurs until.
Methods
Deep copies this instance.
Copies from.
public void CopyFrom(RecurrencePattern other)
The other.
Exceptions:Invalid type.
Gets the next date when the rule can match.
protected DateTime GetNextDate(DateTime start, int index)
The index from the start.
Returns: Exceptions:Invalid RecurrenceFrequency.
Gets the occurrences.
public IEnumerable<DateTime> GetOccurrences(DateTime start)
The start.
Returns:Matches the day of week mask.
protected static bool MatchDayOfWeekMask(DateTime start, RecurrenceDays daysOfWeekMask)
The start.
daysOfWeekMaskRecurrenceDaysThe days of week mask.
Returns:Matches the day ordinal.
protected static bool MatchDayOrdinal(DateTime date, int? dayOrdinal, RecurrenceDays daysOfWeekMask, CultureInfo culture = null)
The date.
dayOrdinalint?The day ordinal.
daysOfWeekMaskRecurrenceDaysThe days of week mask.
cultureCultureInfoThe culture.
Returns:Matches the pattern for a date.
protected bool MatchPattern(DateTime start, DateTime dateTime)
The date to match.
Returns: Exceptions:Invalid RecurrenceFrequency.