Class RecurrenceRule
Represents a base class that the actual recurrence rules extend.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public abstract class RecurrenceRule : INotifyPropertyChanged, ICloneable, IEquatable<RecurrenceRule>
Constructors
RecurrenceRule()
RecurrenceRule(DateTime, DateTime, Int32)
Initializes a new instance of the RecurrenceRule class.
Declaration
public RecurrenceRule(DateTime start, DateTime end, int interval)
Parameters
System.DateTime
start
The start of the recurrence rule. |
System.DateTime
end
The end of the recurrence rule. |
System.Int32
interval
The interval. |
RecurrenceRule(DateTime, DateTime, Int32, Int32)
Initializes a new instance of the RecurrenceRule class.
Declaration
public RecurrenceRule(DateTime start, DateTime end, int interval, int count)
Parameters
System.DateTime
start
The start of the recurrence rule. |
System.DateTime
end
The end of the recurrence rule. |
System.Int32
interval
The interval of the recurrence rule. |
System.Int32
count
The maximum number of occurrences. |
RecurrenceRule(DateTime, Int32)
Initializes a new instance of the RecurrenceRule class.
Declaration
public RecurrenceRule(DateTime start, int interval)
Parameters
System.DateTime
start
The start of the recurrence rule. |
System.Int32
interval
The interval of the recurrence rule. |
RecurrenceRule(DateTime, Int32, Int32)
Initializes a new instance of the RecurrenceRule class.
Declaration
public RecurrenceRule(DateTime start, int interval, int count)
Parameters
System.DateTime
start
The start of the recurrence rule. |
System.Int32
interval
The interval of the recurrence rule. |
System.Int32
count
The maximum number of occurrences. |
Fields
DefaultCount
Declaration
public static readonly int DefaultCount
Field Value
System.Int32
|
DefaultEndDate
Declaration
public static readonly DateTime DefaultEndDate
Field Value
System.DateTime
|
Properties
Count
Gets or sets the maximum number of occurrences.
Declaration
public int Count { get; set; }
Property Value
System.Int32
The count. |
End
Gets or sets the end of the recurrence rule.
Declaration
public DateTime End { get; set; }
Property Value
System.DateTime
The end. |
EventDuration
Gets the durration of the recurring event.
Declaration
public TimeSpan EventDuration { get; }
Property Value
System.TimeSpan
|
ExceptionDates
Declaration
public IList<DateTime> ExceptionDates { get; }
Property Value
System.Collections.Generic.IList<System.DateTime>
|
Frequency
Gets the type of the recurrence rule.
Declaration
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
public int Interval { get; set; }
Property Value
System.Int32
The interval. |
Start
Gets or sets the start of the recurrence rule.
Declaration
public DateTime? Start { get; set; }
Property Value
System.Nullable<System.DateTime>
The start. |
Methods
Clone()
CopyProperties(RecurrenceRule)
Declaration
protected virtual void CopyProperties(RecurrenceRule other)
Parameters
RecurrenceRule
other
|
CreateInstance()
CreateRule(RecurrenceType)
Creates a rule given its type.
Declaration
public static RecurrenceRule CreateRule(RecurrenceType type)
Parameters
RecurrenceType
type
The type of the recurrence rule. |
Returns
RecurrenceRule
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
|
Returns
System.Boolean
|
Overrides
Equals(RecurrenceRule)
Declaration
public virtual bool Equals(RecurrenceRule other)
Parameters
RecurrenceRule
other
|
Returns
System.Boolean
|
Implements
GetHashCode()
Declaration
public override int GetHashCode()
Returns
System.Int32
|
Overrides
GetOccurrenceStart(Int32, 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
public abstract DateTime GetOccurrenceStart(int index, DateTime startDate, DateTimeFormatInfo dateTimeFormat)
Parameters
System.Int32
index
The index after the suggested date. |
System.DateTime
startDate
The suggested start date. |
System.Globalization.DateTimeFormatInfo
dateTimeFormat
The date time format. |
Returns
System.DateTime
A potential occurrence start which should be checked if it matches the pattern. |
IntersectsWithException(DateTime, TimeSpan, IEvent)
Declaration
public abstract bool IntersectsWithException(DateTime eventStart, TimeSpan eventDuration, IEvent exception)
Parameters
System.DateTime
eventStart
|
System.TimeSpan
eventDuration
|
IEvent
exception
|
Returns
System.Boolean
|
IsExceptionDate(DateTime)
Checks if there is an occurrence exception on the specified date.
Declaration
public virtual bool IsExceptionDate(DateTime date)
Parameters
System.DateTime
date
The date to check for exceptions. |
Returns
System.Boolean
[true] if there is an exception on that date, [false] otherwise |
IsValid()
Declaration
public virtual bool IsValid()
Returns
System.Boolean
|
MatchAdvancedPattern(DateTime, DateTimeFormatInfo)
Declaration
public virtual bool MatchAdvancedPattern(DateTime start, DateTimeFormatInfo dateTimeFormat)
Parameters
System.DateTime
start
|
System.Globalization.DateTimeFormatInfo
dateTimeFormat
|
Returns
System.Boolean
|
OnPropertyChanged(String)
Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
System.String
propertyName
|
ResumeNotifications()
Declaration
public virtual void ResumeNotifications()
SuspendNotifications()
Declaration
public virtual void SuspendNotifications()
ToString()
Declaration
public override string ToString()
Returns
System.String
|
Overrides
TryGetCloseToNextOccurrenceDate(DateTime, Boolean, out DateTime)
Declaration
public virtual bool TryGetCloseToNextOccurrenceDate(DateTime currentDate, bool hasOcurrenceOnCurrentDate, out DateTime closeToNextDate)
Parameters
System.DateTime
currentDate
|
System.Boolean
hasOcurrenceOnCurrentDate
|
System.DateTime
closeToNextDate
|
Returns
System.Boolean
|
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|
Explicit Interface Implementations
ICloneable.Clone()
Declaration
object ICloneable.Clone()
Returns
System.Object
|