New to Telerik UI for WinFormsStart a free 30-day trial

Represents a base class that the actual recurrence rules extend.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public abstract class RecurrenceRule : INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>

Inheritance: objectRecurrenceRule

Derived Classes: DailyRecurrenceRuleHourlyRecurrenceRuleMinutelyRecurrenceRuleWeeklyRecurrenceRule

Implements: ICloneableIEquatable<RecurrenceRule>INotifyPropertyChanged

Constructors

Initializes a new instance of the RecurrenceRule class.

C#
public RecurrenceRule()

Initializes a new instance of the RecurrenceRule class.

C#
public RecurrenceRule(DateTime start, DateTime end, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

endDateTime

The end of the recurrence rule.

intervalint

The interval of the recurrence rule.

countint

The maximum number of occurrences.

Initializes a new instance of the RecurrenceRule class.

C#
public RecurrenceRule(DateTime start, DateTime end, int interval)
Parameters:startDateTime

The start of the recurrence rule.

endDateTime

The end of the recurrence rule.

intervalint

The interval.

Initializes a new instance of the RecurrenceRule class.

C#
public RecurrenceRule(DateTime start, int interval, int count)
Parameters:startDateTime

The start of the recurrence rule.

intervalint

The interval of the recurrence rule.

countint

The maximum number of occurrences.

Initializes a new instance of the RecurrenceRule class.

C#
public RecurrenceRule(DateTime start, int interval)
Parameters:startDateTime

The start of the recurrence rule.

intervalint

The interval of the recurrence rule.

Fields

C#
public static readonly int DefaultCount
C#
public static readonly DateTime DefaultEndDate

Properties

Gets or sets the maximum number of occurrences.

C#
public int Count { get; set; }
Property Value:

The count.

Gets or sets the end of the recurrence rule.

C#
public DateTime End { get; set; }
Property Value:

The end.

Gets the durration of the recurring event.

C#
public TimeSpan EventDuration { get; }
C#
public IList<DateTime> ExceptionDates { get; }

Gets the type of the recurrence rule.

C#
public abstract RecurrenceType Frequency { get; }
Property Value:

The type of the recurrence rule.

Gets or sets the interval of the recurrence rule.

C#
public int Interval { get; set; }
Property Value:

The interval.

Gets or sets the start of the recurrence rule.

C#
public DateTime? Start { get; set; }
Property Value:

The start.

Methods

C#
public RecurrenceRule Clone()
Returns:

RecurrenceRule

C#
protected virtual void CopyProperties(RecurrenceRule other)
Parameters:otherRecurrenceRule
C#
protected abstract RecurrenceRule CreateInstance()
Returns:

RecurrenceRule

Creates a rule given its type.

C#
public static RecurrenceRule CreateRule(RecurrenceType type)
Parameters:typeRecurrenceType

The type of the recurrence rule.

Returns:

RecurrenceRule

C#
public override bool Equals(object obj)
Parameters:objobjectReturns:

bool

Overrides: object.Equals(object)

C#
public virtual bool Equals(RecurrenceRule other)
Parameters:otherRecurrenceRuleReturns:

bool

Implements: IEquatable<RecurrenceRule>.Equals(RecurrenceRule)

C#
public override int GetHashCode()
Returns:

int

Overrides: object.GetHashCode()

Gets a date at a given index after the specified startDate. The returned date will be checked with MatchAdvancedPattern to see if it matches the recurrence rule. NOTE: The returned date is not an actual occurence start. To get the start date of a real occurrence use OccurrenceEnumerator.

C#
public abstract DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
Parameters:indexint

The index after the suggested date.

startDateDateTime

The suggested start date.

dateTimeFormatDateTimeFormatInfo

The date time format.

Returns:

DateTime

A potential occurrence start which should be checked if it matches the pattern.

C#
public abstract bool IntersectsWithException(DateTime eventStart, TimeSpan eventDuration, IEvent exception)
Parameters:eventStartDateTimeeventDurationTimeSpanexceptionIEventReturns:

bool

Checks if there is an occurrence exception on the specified date.

C#
public virtual bool IsExceptionDate(DateTime date)
Parameters:dateDateTime

The date to check for exceptions.

Returns:

bool

[true] if there is an exception on that date, [false] otherwise

C#
public virtual bool IsValid()
Returns:

bool

C#
public virtual bool MatchAdvancedPattern(DateTime start, DateTimeFormatInfo dateTimeFormat)
Parameters:startDateTimedateTimeFormatDateTimeFormatInfoReturns:

bool

C#
protected virtual void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring
C#
public virtual void ResumeNotifications()
C#
public virtual void SuspendNotifications()
C#
public override string ToString()
Returns:

string

Overrides: object.ToString()

C#
public virtual bool TryGetCloseToNextOccurrenceDate(DateTime currentDate, bool hasOcurrenceOnCurrentDate, out DateTime closeToNextDate)
Parameters:currentDateDateTimehasOcurrenceOnCurrentDateboolcloseToNextDateDateTimeReturns:

bool

Events

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged