Recurrence Class

This class can be used to generate recurring date/time sequences based on a pattern defined by the RRULE property in the iCalender 2.0 specification.

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
[SerializableAttribute]
public class Recurrence : ISerializable, IXmlSerializable
Inheritance
Object    Recurrence
Implements
ISerializable, IXmlSerializable

Remarks

It is separate from the other PDI calendar classes so that you can use the recurrence engine without the extra overhead of the calendar classes if you do not need it.

Although it does not implement the IEnumerable interface, the class does provide a type-safe enumerator via the GetEnumerator method.

Constructors

Recurrence Default constructor
Recurrence(String) Construct a recurrence from a string in vCalendar 1.0 basic grammar format or iCalendar 2.0 RRULE/EXRULE format.
Recurrence(SerializationInfo, StreamingContext) Deserialization constructor for use with ISerializable

Properties

ByDay This is used to modify the BYDAY rule of a recurrence
ByHour This is used to modify the BYHOUR rule of a recurrence
ByMinute This is used to modify the BYMINUTE rule of a recurrence
ByMonth This is used to modify the BYMONTH rule of a recurrence
ByMonthDay This is used to modify the BYMONTHDAY rule of a recurrence
BySecond This is used to modify the BYSECOND rule of a recurrence
BySetPos This is used to modify the BYSETPOS rule of a recurrence
ByWeekNo This is used to modify the BYWEEKNO rule of a recurrence
ByYearDay This is used to modify the BYYEARDAY rule of a recurrence
CanOccurOnHoliday This is used to set or get whether or not the instances can occur on a holiday
CustomProperties This returns a set of custom properties (if any) found when the recurrence properties where parsed from a string.
Frequency This property is used to set or get the current recurrence frequency
Holidays This is used to add holidays to the recurrence holiday list. These will be used in conjunction with the CanOccurOnHoliday option if it is set to false.
InstanceHolidays This is used to add holidays to the recurrence instance. These will be used in conjunction with the CanOccurOnHoliday option if it is set to false.
Interval This property is used to set or get the interval between instances (the number of seconds, minutes, hours, days, weeks, months, or years based on the recurrence frequency).
IsAdvancedPattern This read-only property is used to examine the recurrence and determine if it is a simple pattern or an advanced pattern.
MaximumOccurrences This is used to get or set the maximum number of occurrences that should be generated by the recurrence.
RecurUntil When retrieved, this property can be used to determine the end date of a recurrence based on the current settings. When set, it makes the recurrence end after the specified date.
StartDateTime This is used to set or get the starting date/time for the recurrence
WeekStart This property is used to set or get the day of the week on which a week begins. This only applies to weekly and yearly recurrences.

Methods

AllInstances This method is used to return all recurring instances based on the current settings alone
Equals This is overridden to allow proper comparison of recurrence objects
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetEnumerator Get a type-safe Recurrence enumerator
GetHashCode Get a hash code for the recurrence object
(Overrides ObjectGetHashCode)
GetObjectData This implements the ISerializable interface and adds the appropriate members to the serialization info based on the recurrence pattern.
GetSchema This returns the schema for the serialized recurrence
GetTypeGets the Type of the current instance.
(Inherited from Object)
InstancesBetween This method is used to return all recurring instances between the two specified date/times based on the current settings.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
NextInstance This method is used to return the next recurring instances on or after the specified date/time based on the current settings.
OccursOn This method is used to determine whether or not an instance of the recurrence falls on the specified date/time.
Parse This is used to parse recurrence properties from a string in vCalendar 1.0 basic grammar format or iCalendar 2.0 RRULE/EXRULE format.
ReadXml This is called to deserialize the instance from XML
RecurDaily Initialize a daily recurrence pattern
RecurEveryWeekday This emulates the Microsoft Outlook daily pattern with the "Every Weekday" option selected
RecurMonthly(Int32, Int32) Initialize a monthly recurrence pattern that occurs on a specific day of the month at the specified monthly interval.
RecurMonthly(DayOccurrence, DaysOfWeek, Int32) Initialize a monthly recurrence pattern that occurs on a specific occurrence of a day of the week at the specified monthly interval (i.e. the 4th Tuesday every two months).
RecurWeekly Initialize a weekly recurrence pattern
RecurYearly(Int32, Int32, Int32) Initialize a yearly recurrence that occurs on a specific month and day at the specified yearly interval.
RecurYearly(DayOccurrence, DaysOfWeek, Int32, Int32) Initialize a yearly recurrence pattern that occurs on a specific occurrence of a day of the week in the specified month at the specified yearly interval (i.e. the last Sunday in September every year).
Reset This can be used to reset a recurrence to its default state
ToDescription Convert the recurrence to a plain text description
ToString Convert the recurrence to its string form
(Overrides ObjectToString)
ToStringWithStartDateTime Convert the recurrence to its string form including the starting date/time
ToVCalendarString Convert the recurrence to its vCalendar 1.0 string form
WriteXml This is called to serialize the instance to XML

See Also