Back to Devexpress

Appointment.RecurrenceInfo Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointment-b521eb5a.md

latest6.8 KB
Original Source

Appointment.RecurrenceInfo Property

Gets information that specifies recurrence rules.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
IRecurrenceInfo RecurrenceInfo { get; }
vb
ReadOnly Property RecurrenceInfo As IRecurrenceInfo

Property Value

TypeDescription
IRecurrenceInfo

A IRecurrenceInfo object that contains information about recurrence rules.

|

Remarks

If the current appointment is recurring the RecurrenceInfo property provides access to its recurrence rules. For the appointments whose type is AppointmentType.Normal this property returns null ( Nothing in Visual Basic).

Important

When working with recurring appointments in bound mode, specify the AppointmentMappingInfo.RecurrenceInfo and AppointmentMappingInfo.Type mappings for correct operation.

To specify recurrence information for an appointment, do not create the RecurrenceInfo instance. It is created automatically for appointment’s pattern. Use the technique described in the How to: Create Appointments with Various Recurrence Types Programmatically document.

Tip

Use the RecurrenceInfo.ToXml and RecurrenceInfo.FromXml methods to save and load the recurrence information in xml format.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RecurrenceInfo property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L43

csharp
if (pattern == null) return;
OccurrenceCalculator calc = OccurrenceCalculator.CreateInstance(pattern.RecurrenceInfo);
TimeInterval processedInterval = new TimeInterval(DateTime.Today, DateTime.Today.AddDays(7));

winforms-scheduler-import-google-calendar/CS/GoogleCalendarExample/RecurrencePatternParser.cs#L41

csharp
pattern.End = end;
iCalendarHelper.ApplyRecurrenceInfo(pattern.RecurrenceInfo, start, rule);
ExceptionDateTimesProperty exceptionProperty = entryContainer.GetProperty(ExceptionDateTimesProperty.TokenName) as ExceptionDateTimesProperty;

report-server-how-to-manage-scheduled-jobs-from-a-windows-forms-application/CS/ScheduledTasksAPIClientDemo/SchedulerJobViewerForm.cs#L92

csharp
const string ScheduledJobExpiredFormat = "Never (expired on {0:d})";
var calculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo);
var nextDate = calculator.FindNextOccurrenceTimeAfter(DateTime.Now, appointment);

winforms-scheduler-import-google-calendar/VB/GoogleCalendarExample/RecurrencePatternParser.vb#L47

vb
pattern.End = [end]
iCalendarHelper.ApplyRecurrenceInfo(pattern.RecurrenceInfo, start, rule)
Dim exceptionProperty As ExceptionDateTimesProperty = TryCast(entryContainer.GetProperty(ExceptionDateTimesProperty.TokenName), ExceptionDateTimesProperty)

winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L41

vb
If pattern Is Nothing Then Return
Dim calc As OccurrenceCalculator = OccurrenceCalculator.CreateInstance(pattern.RecurrenceInfo)
Dim processedInterval As TimeInterval = New TimeInterval(Date.Today, Date.Today.AddDays(7))

report-server-how-to-manage-scheduled-jobs-from-a-windows-forms-application/VB/ScheduledTasksAPIClientDemo/SchedulerJobViewerForm.vb#L98

vb
Const ScheduledJobExpiredFormat As String = "Never (expired on {0:d})"
Dim calculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo)
Dim nextDate = calculator.FindNextOccurrenceTimeAfter(Date.Now, appointment)

See Also

Mappings

How to: Create Appointments with Various Recurrence Types Programmatically

Appointment Interface

Appointment Members

DevExpress.XtraScheduler Namespace