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