Class
RecurrencePattern

Provides the class for recurrence pattern.

Definition

Namespace:Telerik.Maui.Controls.Scheduler

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RecurrencePattern : NotifyPropertyChangedBase, INotifyPropertyChanged

Inheritance: objectNotifyPropertyChangedBaseRecurrencePattern

Implements: INotifyPropertyChanged

Inherited Members NotifyPropertyChangedBase.OnPropertyChanged(string)NotifyPropertyChangedBase.UpdateValue<T>(ref T, T, string)NotifyPropertyChangedBase.UpdateValue<T>(ref T, T, Action<T>, string)NotifyPropertyChangedBase.PropertyChanged

Constructors

RecurrencePattern()

Initializes a new instance of the RecurrencePattern class.

Declaration

cs-api-definition
public RecurrencePattern()

RecurrencePattern(CultureInfo)

Initializes a new instance of the RecurrencePattern class.

Declaration

cs-api-definition
public RecurrencePattern(CultureInfo culture)

Parameters

culture

CultureInfo

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

cs-api-definition
public RecurrencePattern(int? dayOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? monthOfYear, int? dayOrdinal)

Parameters

dayOfMonth

int?

The day of month.

daysOfWeekMask

RecurrenceDays

The days of week mask.

frequency

RecurrenceFrequency

The frequency.

interval

int

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

cs-api-definition
public RecurrencePattern(int[] daysOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? dayOrdinal, int[] hoursOfDay, int[] minutesOfHour)

Parameters

daysOfMonth

int[]

The days of month.

daysOfWeekMask

RecurrenceDays

The days of week mask.

frequency

RecurrenceFrequency

The frequency.

interval

int

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

cs-api-definition
public int? DayOrdinal { get; set; }

Property Value

int?

The day ordinal.

DaysOfMonth

Gets or sets the day of month.

Declaration

cs-api-definition
public int[] DaysOfMonth { get; set; }

Property Value

int[]

The days of month.

DaysOfWeekMask

Gets or sets the days of week mask.

Declaration

cs-api-definition
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

cs-api-definition
public DayOfWeek FirstDayOfWeek { get; set; }

Property Value

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

cs-api-definition
public RecurrenceFrequency Frequency { get; set; }

Property Value

RecurrenceFrequency

The frequency.

HoursOfDay

Gets or sets the hours of day.

Declaration

cs-api-definition
public int[] HoursOfDay { get; set; }

Property Value

int[]

The hours of day.

Interval

Gets or sets the interval.

Declaration

cs-api-definition
public int Interval { get; set; }

Property Value

int

The interval.

MaxOccurrences

Optional limit for the number of occurrences. Defaults to no limit (Int32.MaxInt).

Declaration

cs-api-definition
public int? MaxOccurrences { get; set; }

Property Value

int?

MinutesOfHour

Gets or sets the minutes of hour.

Declaration

cs-api-definition
public int[] MinutesOfHour { get; set; }

Property Value

int[]

The minutes of hour.

MonthOfYear

Gets or sets the month of year.

Declaration

cs-api-definition
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

cs-api-definition
public DateTime? RecursUntil { get; set; }

Property Value

DateTime?

The recurs until.

Methods

Copy()

Deep copies this instance.

Declaration

cs-api-definition
public RecurrencePattern Copy()

Returns

RecurrencePattern

A deep copy of the current object.

CopyFrom(RecurrencePattern)

Copies from.

Declaration

cs-api-definition
public void CopyFrom(RecurrencePattern other)

Parameters

other

RecurrencePattern

The other.

Exceptions

ArgumentException

Invalid type.

GetFirstOccurrence(DateTime)

Gets the first occurrence.

Declaration

cs-api-definition
public DateTime? GetFirstOccurrence(DateTime start)

Parameters

start

DateTime

The start.

Returns

DateTime?

GetNextDate(DateTime, int)

Gets the next date when the rule can match.

Declaration

cs-api-definition
protected DateTime GetNextDate(DateTime start, int index)

Parameters

start

DateTime

index

int

The index from the start.

Returns

DateTime

Exceptions

ArgumentException

Invalid RecurrenceFrequency.

GetOccurrences(DateTime)

Gets the occurrences.

Declaration

cs-api-definition
public IEnumerable<DateTime> GetOccurrences(DateTime start)

Parameters

start

DateTime

The start.

Returns

IEnumerable<DateTime>

GetOccurrences(DateTime, DateTime, DateTime)

Gets the occurrences.

Declaration

cs-api-definition
public IEnumerable<DateTime> GetOccurrences(DateTime start, DateTime from, DateTime to)

Parameters

start

DateTime

The start.

from

DateTime

From.

to

DateTime

To.

Returns

IEnumerable<DateTime>

MatchDayOfWeekMask(DateTime, RecurrenceDays)

Matches the day of week mask.

Declaration

cs-api-definition
protected static bool MatchDayOfWeekMask(DateTime start, RecurrenceDays daysOfWeekMask)

Parameters

start

DateTime

The start.

daysOfWeekMask

RecurrenceDays

The days of week mask.

Returns

bool

MatchDayOrdinal(DateTime, int?, RecurrenceDays, CultureInfo)

Matches the day ordinal.

Declaration

cs-api-definition
protected static bool MatchDayOrdinal(DateTime date, int? dayOrdinal, RecurrenceDays daysOfWeekMask, CultureInfo culture = null)

Parameters

date

DateTime

The date.

dayOrdinal

int?

The day ordinal.

daysOfWeekMask

RecurrenceDays

The days of week mask.

culture

CultureInfo

The culture.

Returns

bool

MatchPattern(DateTime, DateTime)

Matches the pattern for a date.

Declaration

cs-api-definition
protected bool MatchPattern(DateTime start, DateTime dateTime)

Parameters

start

DateTime

dateTime

DateTime

The date to match.

Returns

bool

Exceptions

ArgumentException

Invalid RecurrenceFrequency.