MapiMeetingMessageBuilder Class
A meeting message ([MS-OXOCAL] 2.2.6) to add to a folder of a PstWriter or to save as an .msg file: an invitation or a cancellation, whose recipients are the attendees, or the response of an attendee, whose recipient is the organizer. The properties of the meeting are the ones of an appointment, and MapiAppointmentBuilder.Uid identifies it.
public sealed class MapiMeetingMessageBuilder : MapiAppointmentBuilderExample
var invitation = VCalendar.Parse("""
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example//Example//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:meeting-42@example.com
SEQUENCE:1
DTSTAMP:20260301T080000Z
DTSTART:20260302T090000Z
DTEND:20260302T100000Z
SUMMARY:Project review
LOCATION:Room 1
ORGANIZER;CN=Alice:mailto:alice@example.com
ATTENDEE;CN=Bob;ROLE=REQ-PARTICIPANT:mailto:bob@example.com
END:VEVENT
END:VCALENDAR
""")[0];
// The invitation as a meeting request of Outlook
var request = Assert.IsType<MapiMeetingMessage>(MsgFile.Load(MsgFile.ToByteArray(invitation.ToMapiMeetingMessageBuilder())));
Assert.Equal(MapiMeetingMessageType.Request, request.MeetingMessageType);
Assert.Equal("IPM.Schedule.Meeting.Request", request.MessageClass);
Assert.Equal("meeting-42@example.com", request.Uid);
Assert.Equal("alice@example.com", request.SenderEmailAddress);
Assert.Equal("bob@example.com", request.Recipients.Single().EmailAddress);
// And back as an invitation
var calendar = new VCalendar();
var meeting = calendar.AddMeetingMessage(request);
Assert.Equal("REQUEST", calendar.Method);
Assert.Equal("meeting-42@example.com", meeting.Uid);
Assert.Equal(1, meeting.Sequence);- Inheritance
MapiAppointmentBuilderMapiMeetingMessageBuilder
Constructors
| Name | Description |
|---|---|
| MapiMeetingMessageBuilder(MapiMeetingMessageType) | Initializes a new instance of the MapiMeetingMessageBuilder class. |
MapiMeetingMessageBuilder(MapiMeetingMessageType)
MapiMeetingMessageBuilder.csInitializes a new instance of the MapiMeetingMessageBuilder class.
public MapiMeetingMessageBuilder(MapiMeetingMessageType meetingMessageType)Parameters
meetingMessageTypeMapiMeetingMessageType- The type of the message.
Properties
| Name | Description |
|---|---|
| MeetingMessageType | Gets the type of the message. |
MeetingMessageType
MapiMeetingMessageBuilder.csGets the type of the message.
public MapiMeetingMessageType MeetingMessageType { get; }