Class RecurrenceRule
A recurrence rule (RFC 5545 §3.3.10). Parsed but NOT evaluated in Phase 3. Evaluation (generating occurrence dates) is Phase 4.
Inherited Members
Namespace: DRIT.Mail.Rfc.ICal
Assembly: DRIT.Mail.dll
Syntax
public sealed class RecurrenceRule
Constructors
View SourceRecurrenceRule(RecurrenceFrequency)
Initializes a new instance of the RecurrenceRule class.
Declaration
public RecurrenceRule(RecurrenceFrequency frequency)
Parameters
| Type | Name | Description |
|---|---|---|
| RecurrenceFrequency | frequency | The recurrence frequency. |
Properties
View SourceByDays
Gets the BYDAY list (weekdays with optional ordinals).
Declaration
public IReadOnlyList<WeekDay> ByDays { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<WeekDay> |
ByHours
Gets the BYHOUR list (0-23).
Declaration
public IReadOnlyList<int> ByHours { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
ByMinutes
Gets the BYMINUTE list (0-59).
Declaration
public IReadOnlyList<int> ByMinutes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
ByMonthDays
Gets the BYMONTHDAY list (1-31, -1 to -31).
Declaration
public IReadOnlyList<int> ByMonthDays { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
ByMonths
Gets the BYMONTH list (1-12).
Declaration
public IReadOnlyList<int> ByMonths { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
BySeconds
Gets the BYSECOND list (0-60).
Declaration
public IReadOnlyList<int> BySeconds { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
BySetPositions
Gets the BYSETPOS list (1-366, -1 to -366).
Declaration
public IReadOnlyList<int> BySetPositions { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
ByWeekNumbers
Gets the BYWEEKNO list (1-53, -1 to -53).
Declaration
public IReadOnlyList<int> ByWeekNumbers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
ByYearDays
Gets the BYYEARDAY list (1-366, -1 to -366).
Declaration
public IReadOnlyList<int> ByYearDays { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<int> |
Count
Gets the number of occurrences, or null if not specified.
Declaration
public int? Count { get; }
Property Value
| Type | Description |
|---|---|
| int? |
Frequency
Gets the recurrence frequency (DAILY, WEEKLY, MONTHLY, YEARLY, etc.).
Declaration
public RecurrenceFrequency Frequency { get; }
Property Value
| Type | Description |
|---|---|
| RecurrenceFrequency |
Interval
Gets the interval between recurrences (default 1).
Declaration
public int Interval { get; }
Property Value
| Type | Description |
|---|---|
| int |
Until
Gets the end date of the recurrence, or null if not specified.
Declaration
public ICalDateTime? Until { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
WeekStart
Gets the week start day (default Monday).
Declaration
public DayOfWeek WeekStart { get; }
Property Value
| Type | Description |
|---|---|
| DayOfWeek |
Methods
View SourceParse(string)
Parses a recurrence rule string (RFC 5545 §3.3.10). For example,
FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE,FR;COUNT=10.
Declaration
public static RecurrenceRule Parse(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Specifies the text value. |
Returns
| Type | Description |
|---|---|
| RecurrenceRule |
ToString()
Formats this recurrence rule for iCalendar serialization.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |