Class
RecurrenceRule

Represents a base class that the actual recurrence rules extend.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

cs-api-definition
public abstract class RecurrenceRule : INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>

Inheritance: objectRecurrenceRule

Derived Classes: DailyRecurrenceRuleHourlyRecurrenceRuleMinutelyRecurrenceRuleWeeklyRecurrenceRule

Implements: ICloneableIEquatable<RecurrenceRule>INotifyPropertyChanged

Constructors

RecurrenceRule()

Initializes a new instance of the RecurrenceRule class.

Declaration

cs-api-definition
public RecurrenceRule()

RecurrenceRule(DateTime, DateTime, int)

Initializes a new instance of the RecurrenceRule class.

Declaration

cs-api-definition
public RecurrenceRule(DateTime start, DateTime end, int interval)

Parameters

start

DateTime

The start of the recurrence rule.

end

DateTime

The end of the recurrence rule.

interval

int

The interval.

RecurrenceRule(DateTime, DateTime, int, int)

Initializes a new instance of the RecurrenceRule class.

Declaration

cs-api-definition
public RecurrenceRule(DateTime start, DateTime end, int interval, int count)

Parameters

start

DateTime

The start of the recurrence rule.

end

DateTime

The end of the recurrence rule.

interval

int

The interval of the recurrence rule.

count

int

The maximum number of occurrences.

RecurrenceRule(DateTime, int)

Initializes a new instance of the RecurrenceRule class.

Declaration

cs-api-definition
public RecurrenceRule(DateTime start, int interval)

Parameters

start

DateTime

The start of the recurrence rule.

interval

int

The interval of the recurrence rule.

RecurrenceRule(DateTime, int, int)

Initializes a new instance of the RecurrenceRule class.

Declaration

cs-api-definition
public RecurrenceRule(DateTime start, int interval, int count)

Parameters

start

DateTime

The start of the recurrence rule.

interval

int

The interval of the recurrence rule.

count

int

The maximum number of occurrences.

Fields

DefaultCount

Declaration

cs-api-definition
public static readonly int DefaultCount

Field Value

int

DefaultEndDate

Declaration

cs-api-definition
public static readonly DateTime DefaultEndDate

Field Value

DateTime

Properties

Count

Gets or sets the maximum number of occurrences.

Declaration

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

Property Value

int

The count.

End

Gets or sets the end of the recurrence rule.

Declaration

cs-api-definition
public DateTime End { get; set; }

Property Value

DateTime

The end.

EventDuration

Gets the durration of the recurring event.

Declaration

cs-api-definition
public TimeSpan EventDuration { get; }

Property Value

TimeSpan

ExceptionDates

Declaration

cs-api-definition
public IList<DateTime> ExceptionDates { get; }

Property Value

IList<DateTime>

Frequency

Gets the type of the recurrence rule.

Declaration

cs-api-definition
public abstract RecurrenceType Frequency { get; }

Property Value

RecurrenceType

The type of the recurrence rule.

Interval

Gets or sets the interval of the recurrence rule.

Declaration

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

Property Value

int

The interval.

Start

Gets or sets the start of the recurrence rule.

Declaration

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

Property Value

DateTime?

The start.

Methods

Clone()

Declaration

cs-api-definition
public RecurrenceRule Clone()

Returns

RecurrenceRule

CopyProperties(RecurrenceRule)

Declaration

cs-api-definition
protected virtual void CopyProperties(RecurrenceRule other)

Parameters

other

RecurrenceRule

CreateInstance()

Declaration

cs-api-definition
protected abstract RecurrenceRule CreateInstance()

Returns

RecurrenceRule

CreateRule(RecurrenceType)

Creates a rule given its type.

Declaration

cs-api-definition
public static RecurrenceRule CreateRule(RecurrenceType type)

Parameters

type

RecurrenceType

The type of the recurrence rule.

Returns

RecurrenceRule

Equals(RecurrenceRule)

Declaration

cs-api-definition
public virtual bool Equals(RecurrenceRule other)

Parameters

other

RecurrenceRule

Returns

bool

Implements IEquatable<RecurrenceRule>.Equals(RecurrenceRule)

Equals(object)

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

Returns

bool

Overrides object.Equals(object)

GetHashCode()

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

Overrides object.GetHashCode()

GetOccurrenceStart(int, DateTime, DateTimeFormatInfo)

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.

Declaration

cs-api-definition
public abstract DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)

Parameters

index

int

The index after the suggested date.

startDate

DateTime

The suggested start date.

dateTimeFormat

DateTimeFormatInfo

The date time format.

Returns

DateTime

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

IntersectsWithException(DateTime, TimeSpan, IEvent)

Declaration

cs-api-definition
public abstract bool IntersectsWithException(DateTime eventStart, TimeSpan eventDuration, IEvent exception)

Parameters

eventStart

DateTime

eventDuration

TimeSpan

exception

IEvent

Returns

bool

IsExceptionDate(DateTime)

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

Declaration

cs-api-definition
public virtual bool IsExceptionDate(DateTime date)

Parameters

date

DateTime

The date to check for exceptions.

Returns

bool

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

IsValid()

Declaration

cs-api-definition
public virtual bool IsValid()

Returns

bool

MatchAdvancedPattern(DateTime, DateTimeFormatInfo)

Declaration

cs-api-definition
public virtual bool MatchAdvancedPattern(DateTime start, DateTimeFormatInfo dateTimeFormat)

Parameters

start

DateTime

dateTimeFormat

DateTimeFormatInfo

Returns

bool

OnPropertyChanged(string)

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

ResumeNotifications()

Declaration

cs-api-definition
public virtual void ResumeNotifications()

SuspendNotifications()

Declaration

cs-api-definition
public virtual void SuspendNotifications()

ToString()

Declaration

cs-api-definition
public override string ToString()

Returns

string

Overrides object.ToString()

TryGetCloseToNextOccurrenceDate(DateTime, bool, out DateTime)

Declaration

cs-api-definition
public virtual bool TryGetCloseToNextOccurrenceDate(DateTime currentDate, bool hasOcurrenceOnCurrentDate, out DateTime closeToNextDate)

Parameters

currentDate

DateTime

hasOcurrenceOnCurrentDate

bool

closeToNextDate

DateTime

Returns

bool

Events

PropertyChanged

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged