WeeklyRecurrenceRule
Represents a weekly recurrence rule.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class WeeklyRecurrenceRule : RecurrenceRule, INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>
Inheritance: objectRecurrenceRuleWeeklyRecurrenceRule
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the WeeklyRecurrenceRule class.
public WeeklyRecurrenceRule()
Initializes a new instance of the WeeklyRecurrenceRule class.
Initializes a new instance of the WeeklyRecurrenceRule class.
Initializes a new instance of the WeeklyRecurrenceRule class.
Initializes a new instance of the WeeklyRecurrenceRule class.
Fields
The default offset, which does not apply an ordinal weekday filter.
public static readonly int DefaultOffset
The positive- or negative-offset matcher selected when Offset is set.
protected WeeklyRecurrenceRule.MatchOffsetDelegate MatchOffset
Properties
Gets or sets the first day used to group dates into weeks; null uses the culture's setting.
public DayOfWeek? FirstDayOfWeek { get; set; }
Gets the type of the recurrence rule.
public override RecurrenceType Frequency { get; }
The type of the recurrence rule.
Overrides:
Methods
Copies the base recurrence settings, weekday mask, and offset to another rule. FirstDayOfWeek is not copied, and a copied nonzero offset does not initialize MatchOffset.
protected override void CopyProperties(RecurrenceRule other)
The rule that receives the copied properties.
Overrides:
Creates a new instance of the concrete rule type for use by Clone().
protected override RecurrenceRule CreateInstance()
A new instance of the concrete recurrence-rule type.
Overrides:
Compares the weekday mask and offset, then the shared recurrence settings. FirstDayOfWeek is not included in the comparison.
public override bool Equals(RecurrenceRule other)
The rule to compare with this weekly rule.
Returns:true when the compared settings are equal; otherwise, false.
Overrides:
Toggles the specified weekday flags in the rule's mask; flags that were absent become included.
Resolves the rule's week start, falling back to the supplied culture's first weekday.
protected DayOfWeek GetFirstDayOfWeek(DateTimeFormatInfo dateTimeFormat)
The culture-specific date information.
Returns:The explicitly configured first weekday, or FirstDayOfWeek when none is set.
Gets the negative-offset boundary; this implementation returns the boundary immediately after the containing week. Derived period rules can override the boundary.
protected virtual DateTime GetNegativeOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
A date in the week to inspect.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to determine the week.
Returns:The negative-offset boundary for the period containing date.
Gets the occurrence start given a occurrence index.
public override DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
The index.
startDateDateTimeThe start of the reccuring series.
dateTimeFormatDateTimeFormatInfoThe date time format.
Returns:Overrides:
Gets the positive-offset start boundary; this implementation uses the beginning of the containing week. Derived period rules can override the boundary.
protected virtual DateTime GetPositiveOffsetStart(DateTime date, DateTimeFormatInfo dateTimeFormat)
A date in the week to inspect.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to determine the week.
Returns:The start of the week containing date.
Adds the specified weekdays to the rule's weekday mask.
Matches an exception by calendar date, regardless of the events' times or durations.
public override bool IntersectsWithException(DateTime eventStart, TimeSpan eventDuration, IEvent exception)
The start of the candidate occurrence.
eventDurationTimeSpanThe candidate occurrence duration; it does not affect date matching.
exceptionIEventThe exception event to compare with the candidate occurrence.
Returns:true when both starts fall on the same year and day of year; otherwise, false.
Overrides:
Checks whether a date's weekday is selected by the rule's weekday mask. Derived rules can add period-specific constraints.
protected virtual bool IsOffsetMatch(DateTime date, DateTimeFormatInfo dateTimeFormat)
The date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to resolve its weekday.
Returns:true when the date matches the weekday mask; otherwise, false.
Checks the interval week and weekday mask, or the start date's weekday when WeekDays is None, then applies the configured positive or negative weekday offset.
public override bool MatchAdvancedPattern(DateTime start, DateTimeFormatInfo dateTimeFormat)
The candidate occurrence start.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used to determine week boundaries.
Returns:true when the candidate matches the weekly pattern; otherwise, false.
Overrides:
Tests whether the candidate's calendar weekday is present in the rule's WeekDays mask.
Counts selected dates after the candidate through the boundary returned by GetNegativeOffsetStart(DateTime, DateTimeFormatInfo).
protected bool MatchOffsetNegative(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used for week calculations.
Returns:true when the negative count matches Offset; otherwise, false.
Counts selected dates from the boundary returned by GetPositiveOffsetStart(DateTime, DateTimeFormatInfo) through the candidate.
protected bool MatchOffsetPositive(DateTime date, DateTimeFormatInfo dateTimeFormat)
The candidate date to check.
dateTimeFormatDateTimeFormatInfoCulture-specific calendar information used for week calculations.
Returns: