VEvent Class
An event of an iCalendar object (VEVENT): a meeting, an appointment or an all-day event, with its recurrence.
public sealed class VEvent : CalendarComponent- Inheritance
CalendarComponentVEvent
Constructors
| Name | Description |
|---|---|
| VEvent() | Creates an event. |
VEvent()
VEvent.csCreates an event.
public VEvent()Properties
| Name | Description |
|---|---|
| Attendees | Gets the attendees (ATTENDEE). |
| Categories | Gets the categories (CATEGORIES). |
| Description | Gets or sets the description (DESCRIPTION). |
| Duration | Gets or sets the duration (DURATION), which an event has instead of an end. |
| End | Gets or sets the end (DTEND), exclusive: the day after the last day of an all-day event. |
| ExceptionDates | Gets the dates of the occurrences the recurrence excludes (EXDATE). |
| IsAllDay | Gets whether the event lasts whole days: its start is a date. |
| LastModified | Gets or sets when the event was last modified (LAST-MODIFIED). |
| Location | Gets or sets the location (LOCATION). |
| Organizer | Gets or sets the organizer (ORGANIZER). |
| RecurrenceDates | Gets the dates of the occurrences the recurrence adds (RDATE). |
| RecurrenceId | Gets or sets the original start of the occurrence this event replaces (RECURRENCE-ID), for an exception of a recurring event. |
| RecurrenceRule | Gets or sets the recurrence rule (RRULE). |
| Sequence | Gets or sets the revision of the event (SEQUENCE). |
| Stamp | Gets or sets when the object was written (DTSTAMP). |
| Start | Gets or sets the start (DTSTART). |
| Status | Gets or sets the status (STATUS): TENTATIVE, CONFIRMED or CANCELLED. |
| Summary | Gets or sets the summary, the subject of the event (SUMMARY). |
| Transparency | Gets or sets whether the event blocks time (TRANSP: OPAQUE or TRANSPARENT). |
| Uid | Gets or sets the unique identifier (UID). |
Attendees
VEvent.csGets the attendees (ATTENDEE).
public IReadOnlyList<CalendarAttendee> Attendees { get; }Property value
Categories
VEvent.csDescription
VEvent.csDuration
VEvent.csEnd
VEvent.csGets or sets the end (DTEND), exclusive: the day after the last day of an all-day event.
public CalendarDateTime? End { get; set; }Property value
ExceptionDates
VEvent.csGets the dates of the occurrences the recurrence excludes (EXDATE).
public IReadOnlyList<CalendarDateTime> ExceptionDates { get; }Property value
IsAllDay
VEvent.csLastModified
VEvent.csGets or sets when the event was last modified (LAST-MODIFIED).
public CalendarDateTime? LastModified { get; set; }Property value
Location
VEvent.csOrganizer
VEvent.csGets or sets the organizer (ORGANIZER).
public CalendarAttendee? Organizer { get; set; }Property value
RecurrenceDates
VEvent.csGets the dates of the occurrences the recurrence adds (RDATE).
public IReadOnlyList<CalendarDateTime> RecurrenceDates { get; }Property value
RecurrenceId
VEvent.csGets or sets the original start of the occurrence this event replaces (RECURRENCE-ID), for an exception of a recurring event.
public CalendarDateTime? RecurrenceId { get; set; }Property value
RecurrenceRule
VEvent.csGets or sets the recurrence rule (RRULE).
public RecurrenceRule? RecurrenceRule { get; set; }Property value
Sequence
VEvent.csStamp
VEvent.csGets or sets when the object was written (DTSTAMP).
public CalendarDateTime? Stamp { get; set; }Property value
Start
VEvent.csStatus
VEvent.csSummary
VEvent.csTransparency
VEvent.csUid
VEvent.csMethods
| Name | Description |
|---|---|
| AddAttendee(CalendarAttendee) | Adds an attendee. |
| AddExceptionDate(CalendarDateTime) | Adds a date to the dates the recurrence excludes (EXDATE). |
| GetOccurrences() | Returns the start times of the occurrences of the event: its start, the dates of its recurrence rule and RDATE, without the dates of EXDATE. The times are in the basis of the start (UTC, local in its time zone, or floating). |
| SetCategories(IEnumerable<string>) | Sets the categories. |
| ToMapiAppointmentBuilder() | Creates the builder of an appointment of Outlook from the event: its times in UTC (with the time zones of the calendar), its recurrence when Outlook can represent it, its attendees and its first reminder. |
AddAttendee(CalendarAttendee)
VEvent.csAdds an attendee.
public void AddAttendee(CalendarAttendee attendee)Parameters
attendeeCalendarAttendee- The attendee.
AddExceptionDate(CalendarDateTime)
VEvent.csAdds a date to the dates the recurrence excludes (EXDATE).
public void AddExceptionDate(CalendarDateTime date)Parameters
dateCalendarDateTime- The original start of the occurrence.
GetOccurrences()
VEvent.csReturns the start times of the occurrences of the event: its start, the dates of its recurrence rule and RDATE, without the dates of EXDATE. The times are in the basis of the start (UTC, local in its time zone, or floating).
public IEnumerable<DateTime> GetOccurrences()Returns
IEnumerable<DateTime> The start times, in order; infinitely many for a rule without an end.
Exceptions
NotSupportedException- The recurrence rule has parts
RecurrenceRule.GetOccurrencesdoes not support.
SetCategories(IEnumerable<string>)
VEvent.csSets the categories.
public void SetCategories(IEnumerable<string> categories)Parameters
categoriesIEnumerable<string>- The categories.
ToMapiAppointmentBuilder()
VEvent.csCreates the builder of an appointment of Outlook from the event: its times in UTC (with the time zones of the calendar), its recurrence when Outlook can represent it, its attendees and its first reminder.
public MapiAppointmentBuilder ToMapiAppointmentBuilder()Returns
MapiAppointmentBuilder The builder.