RecurrenceRecurWeekly Method
Initialize a weekly recurrence pattern
Namespace: EWSoftware.PDIAssembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public void RecurWeekly(
int recurInterval,
DaysOfWeek daysOfWeek
)
Public Sub RecurWeekly (
recurInterval As Integer,
daysOfWeek As DaysOfWeek
)
public:
void RecurWeekly(
int recurInterval,
DaysOfWeek daysOfWeek
)
member RecurWeekly :
recurInterval : int *
daysOfWeek : DaysOfWeek -> unit
Parameters
- recurInterval Int32
- The interval between occurrences in weeks
- daysOfWeek DaysOfWeek
- The days of the week on which the instances should occur
This is a convenience method that mimics the weekly recurrence pattern in Microsoft Outlook.
When called, it sets up the recurrence for a weekly pattern that recurs at the specified interval on
the specified days of the week. All rule parts are cleared prior to setting the weekly options but
other parameters such as the start date are left alone.
// Test weekly recurrence
rRecur.RecurWeekly(1, DaysOfWeek.Monday | DaysOfWeek.Wednesday);
rRecur.StartDateTime = DateTime.Today;
rRecur.RecurUntil = DateTime.Today.AddMonths(1);
// With a collection
DateTimeCollection recurDates = rRecur.InstancesBetween(DateTime.Today,
DateTime.Today.AddMonths(1));
foreach(DateTime dt in recurDates)
Console.WriteLine("Weekly recurrence on: {0:d}", dt);
// Using the enumerator
foreach(DateTime dt in rRecur)
Console.WriteLine("Weekly recurrence on: {0:d}", dt);
' Test weekly recurrence
rRecur.RecurWeekly(1, DaysOfWeek.Monday Or DaysOfWeek.Wednesday)
rRecur.StartDateTime = DateTime.Today
rRecur.RecurUntil = DateTime.Today.AddMonths(1)
' With a collection
Dim recurDates As DateTimeCollection = rRecur.InstancesBetween(DateTime.Today,
DateTime.Today.AddMonths(1))
For Each dt In recurDates
Console.WriteLine("Weekly recurrence on: {0:d}", dt)
Next
' Using the enumerator
For Each dt In rRecur
Console.WriteLine("Weekly recurrence on: {0:d}", dt)
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.