Class CalendarEvent
A calendar event (RFC 5545 §3.6.1), the value of a VEVENT component.
Inherited Members
Namespace: DRIT.Mail.Rfc.ICal
Assembly: DRIT.Mail.dll
Syntax
public sealed class CalendarEvent
Constructors
View SourceCalendarEvent(string?, ICalDateTime?, ICalDateTime?, ICalDuration?, bool, string?, string?, string?, string?, ICalDateTime?, ICalDateTime?, ICalDateTime?, int?, EventStatus?, Transparency?, int?, Classification?, IReadOnlyList<string>, string?, string?, IReadOnlyList<string>, ICalGeo?, Organizer?, IReadOnlyList<Attendee>, RecurrenceRule?, IReadOnlyList<ICalDateTime>, IReadOnlyList<ICalDateTime>, ICalDateTime?, IReadOnlyList<Alarm>, IReadOnlyList<ICalProperty>)
Initializes a new instance of the CalendarEvent class.
Declaration
public CalendarEvent(string? uid, ICalDateTime? start, ICalDateTime? end, ICalDuration? duration, bool allDay, string? summary, string? description, string? location, string? url, ICalDateTime? dateTimeStamp, ICalDateTime? created, ICalDateTime? lastModified, int? sequence, EventStatus? status, Transparency? transparency, int? priority, Classification? classification, IReadOnlyList<string> categories, string? comment, string? contact, IReadOnlyList<string> resources, ICalGeo? geo, Organizer? organizer, IReadOnlyList<Attendee> attendees, RecurrenceRule? recurrenceRule, IReadOnlyList<ICalDateTime> recurrenceDates, IReadOnlyList<ICalDateTime> exceptionDates, ICalDateTime? recurrenceId, IReadOnlyList<Alarm> alarms, IReadOnlyList<ICalProperty> extendedProperties)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uid | |
| ICalDateTime | start | |
| ICalDateTime | end | |
| ICalDuration | duration | |
| bool | allDay | |
| string | summary | |
| string | description | |
| string | location | |
| string | url | |
| ICalDateTime | dateTimeStamp | |
| ICalDateTime | created | |
| ICalDateTime | lastModified | |
| int? | sequence | |
| EventStatus? | status | |
| Transparency? | transparency | |
| int? | priority | |
| Classification? | classification | |
| IReadOnlyList<string> | categories | |
| string | comment | |
| string | contact | |
| IReadOnlyList<string> | resources | |
| ICalGeo | geo | |
| Organizer | organizer | |
| IReadOnlyList<Attendee> | attendees | |
| RecurrenceRule | recurrenceRule | |
| IReadOnlyList<ICalDateTime> | recurrenceDates | |
| IReadOnlyList<ICalDateTime> | exceptionDates | |
| ICalDateTime | recurrenceId | |
| IReadOnlyList<Alarm> | alarms | |
| IReadOnlyList<ICalProperty> | extendedProperties |
Properties
View SourceAlarms
Gets the alarms (VALARM). May be empty.
Declaration
public IReadOnlyList<Alarm> Alarms { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Alarm> |
AllDay
Gets a value indicating whether this is an all-day event (DTSTART has VALUE=DATE).
Declaration
public bool AllDay { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Attendees
Gets the attendees (ATTENDEE). May be empty.
Declaration
public IReadOnlyList<Attendee> Attendees { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Attendee> |
Categories
Gets the categories (CATEGORIES). May be empty.
Declaration
public IReadOnlyList<string> Categories { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Classification
Gets the classification (CLASS), or null.
Declaration
public Classification? Classification { get; }
Property Value
| Type | Description |
|---|---|
| Classification? |
Comment
Gets the comment (COMMENT), or null.
Declaration
public string? Comment { get; }
Property Value
| Type | Description |
|---|---|
| string |
Contact
Gets the contact (CONTACT), or null.
Declaration
public string? Contact { get; }
Property Value
| Type | Description |
|---|---|
| string |
Created
Gets the creation timestamp (CREATED), or null.
Declaration
public ICalDateTime? Created { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
DateTimeStamp
Gets the last modification timestamp (DTSTAMP), or null.
Declaration
public ICalDateTime? DateTimeStamp { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
Description
Gets the description (DESCRIPTION), or null.
Declaration
public string? Description { get; }
Property Value
| Type | Description |
|---|---|
| string |
Duration
Gets the duration (DURATION), or null.
Declaration
public ICalDuration? Duration { get; }
Property Value
| Type | Description |
|---|---|
| ICalDuration |
End
Gets the end date-time (DTEND), or null.
Declaration
public ICalDateTime? End { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
ExceptionDates
Gets the exception dates (EXDATE). May be empty.
Declaration
public IReadOnlyList<ICalDateTime> ExceptionDates { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ICalDateTime> |
ExtendedProperties
Gets the X-* extension properties. May be empty.
Declaration
public IReadOnlyList<ICalProperty> ExtendedProperties { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ICalProperty> |
Geo
Gets the geographic position (GEO), or null.
Declaration
public ICalGeo? Geo { get; }
Property Value
| Type | Description |
|---|---|
| ICalGeo |
LastModified
Gets the last modification timestamp (LAST-MODIFIED), or null.
Declaration
public ICalDateTime? LastModified { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
Location
Gets the location (LOCATION), or null.
Declaration
public string? Location { get; }
Property Value
| Type | Description |
|---|---|
| string |
Organizer
Gets the organizer (ORGANIZER), or null.
Declaration
public Organizer? Organizer { get; }
Property Value
| Type | Description |
|---|---|
| Organizer |
Priority
Gets the priority (PRIORITY, 0-9), or null.
Declaration
public int? Priority { get; }
Property Value
| Type | Description |
|---|---|
| int? |
RecurrenceDates
Gets the recurrence dates (RDATE). May be empty.
Declaration
public IReadOnlyList<ICalDateTime> RecurrenceDates { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ICalDateTime> |
RecurrenceId
Gets the recurrence identifier (RECURRENCE-ID), or null.
Declaration
public ICalDateTime? RecurrenceId { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
RecurrenceRule
Gets the recurrence rule (RRULE), or null.
Declaration
public RecurrenceRule? RecurrenceRule { get; }
Property Value
| Type | Description |
|---|---|
| RecurrenceRule |
Resources
Gets the resources (RESOURCES). May be empty.
Declaration
public IReadOnlyList<string> Resources { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Sequence
Gets the revision sequence number (SEQUENCE), or null.
Declaration
public int? Sequence { get; }
Property Value
| Type | Description |
|---|---|
| int? |
Start
Gets the start date-time (DTSTART), or null.
Declaration
public ICalDateTime? Start { get; }
Property Value
| Type | Description |
|---|---|
| ICalDateTime |
Status
Gets the status (STATUS), or null.
Declaration
public EventStatus? Status { get; }
Property Value
| Type | Description |
|---|---|
| EventStatus? |
Summary
Gets the summary (SUMMARY), or null.
Declaration
public string? Summary { get; }
Property Value
| Type | Description |
|---|---|
| string |
Transparency
Gets the time transparency (TRANSP), or null.
Declaration
public Transparency? Transparency { get; }
Property Value
| Type | Description |
|---|---|
| Transparency? |
Uid
Gets the unique identifier (UID), or null.
Declaration
public string? Uid { get; }
Property Value
| Type | Description |
|---|---|
| string |
Url
Gets the URL, or null.
Declaration
public string? Url { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetOccurrences(ICalDateTime?, ICalDateTime?, int)
Gets all occurrence date-times of this event, evaluated from the RecurrenceRule, RecurrenceDates (RDATE), and ExceptionDates (EXDATE). The first occurrence is always Start. If this event has no recurrence rule and no recurrence dates, a single-element list containing Start is returned (or an empty list if Start is null).
Declaration
public IReadOnlyList<ICalDateTime> GetOccurrences(ICalDateTime? rangeStart = null, ICalDateTime? rangeEnd = null, int maxOccurrences = 1000)
Parameters
| Type | Name | Description |
|---|---|---|
| ICalDateTime | rangeStart | The inclusive lower bound of the range, or null for no lower bound. Occurrences
before this bound are still counted toward |
| ICalDateTime | rangeEnd | The inclusive upper bound of the range, or null for no upper bound. |
| int | maxOccurrences | The maximum number of occurrences to generate. Defaults to DefaultMaxOccurrences. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<ICalDateTime> | An ordered list of occurrence date-times within the specified range. |