MapiAppointment Class
An appointment or a meeting (IPM.Appointment).
public class MapiAppointment : MapiMessageExample
using var file = PstFile.Open(path);
var appointment = file.GetFolder("Calendar")!.EnumerateItems().OfType<MapiAppointment>().Single();
Assert.Equal("Test appointment", appointment.Subject);
Assert.Equal(new DateTime(2016, 8, 2, 15, 0, 0, DateTimeKind.Utc), appointment.Start);
// The recurrence: every Tuesday, with deleted and moved occurrences
var recurrence = appointment.GetRecurrence()!;
Assert.Equal(MapiRecurrenceFrequency.Weekly, recurrence.Frequency);
Assert.Equal(MapiDaysOfWeek.Tuesday, recurrence.DaysOfWeek);
Assert.HasCount(3, recurrence.DeletedInstanceDates);
Assert.HasCount(2, recurrence.Exceptions);
Assert.Equal(new DateTime(2016, 8, 23, 9, 0, 0), recurrence.Exceptions[0].StartDateTime);
// The RTF body, decompressed from the compressed RTF property
var rtf = Encoding.ASCII.GetString(appointment.GetRtfBody()!);
Assert.StartsWith(@"{\rtf1", rtf, StringComparison.Ordinal);- Inheritance
MapiMessageMapiAppointment
Properties
| Name | Description |
|---|---|
| AllAttendees | Gets the display names of all the attendees, separated by semicolons. |
| BusyStatus | Gets how the appointment shows the time of the user. |
| Duration | Gets the duration of the appointment. |
| End | Gets the date and time, in UTC, when the appointment (or the first occurrence of a recurring appointment) ends. |
| IsAllDay | Gets whether the appointment is an all-day event. |
| IsMeeting | Gets whether the appointment is a meeting, which has attendees. |
| IsRecurring | Gets whether the appointment is recurring. |
| Location | Gets the location. |
| OptionalAttendees | Gets the display names of the optional attendees, separated by semicolons. |
| RecurrenceDescription | Gets the description of the recurrence, such as "every Monday from 9:00 to 10:00". |
| ReminderDelta | Gets how long before the start the reminder fires. |
| ReminderSet | Gets whether a reminder is set. |
| RequiredAttendees | Gets the display names of the required attendees, separated by semicolons. |
| Sequence | Gets the sequence number of the meeting, incremented by the organizer when the meeting changes. |
| Start | Gets the date and time, in UTC, when the appointment (or the first occurrence of a recurring appointment) starts. |
| TimeZoneDescription | Gets the description of the time zone of the appointment. |
| Uid | Gets the unique identifier of the meeting, the UID of iCalendar: the identifier given by another application, or the hexadecimal global object identifier Outlook creates ([MS-OXCICAL] 2.1.3.1.1.20.26). |
AllAttendees
MapiAppointment.csBusyStatus
MapiAppointment.csGets how the appointment shows the time of the user.
public MapiBusyStatus BusyStatus { get; }Property value
Duration
MapiAppointment.csIsAllDay
MapiAppointment.csIsMeeting
MapiAppointment.csIsRecurring
MapiAppointment.csLocation
MapiAppointment.csOptionalAttendees
MapiAppointment.csRecurrenceDescription
MapiAppointment.csReminderDelta
MapiAppointment.csReminderSet
MapiAppointment.csRequiredAttendees
MapiAppointment.csSequence
MapiAppointment.csStart
MapiAppointment.csTimeZoneDescription
MapiAppointment.csMethods
| Name | Description |
|---|---|
| GetRecurrence() | Returns the recurrence of the appointment. |
GetRecurrence()
MapiAppointment.csReturns the recurrence of the appointment.
public MapiRecurrencePattern? GetRecurrence()Returns
MapiRecurrencePattern? The recurrence, or null when the appointment is not recurring.
Exceptions
InvalidEmailDataException- The recurrence is malformed.