Table of Contents

Class Appointment

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents an appointment or a meeting. Properties available on appointments are defined in the AppointmentSchema class.

public class Appointment : Item
Inheritance
Appointment
Inherited Members

Constructors

Appointment(ExchangeService)

Initializes an unsaved local instance of Appointment. To bind to an existing appointment, use Appointment.Bind() instead.

public Appointment(ExchangeService service)

Parameters

service ExchangeService

The ExchangeService instance to which this appointmtnt is bound.

Properties

AdjacentMeetingCount

Gets the number of calendar entries that are adjacent to this appointment in the authenticated user's calendar.

public int AdjacentMeetingCount { get; }

Property Value

int

AdjacentMeetings

Gets a list of meetings that conflict with this appointment in the authenticated user's calendar.

public ItemCollection<Appointment> AdjacentMeetings { get; }

Property Value

ItemCollection<Appointment>

AllowNewTimeProposal

Gets or sets a value indicating whether new time proposals are allowed for attendees of this meeting.

public bool AllowNewTimeProposal { get; set; }

Property Value

bool

AppointmentReplyTime

Gets the time when the attendee replied to the meeting request.

public DateTime AppointmentReplyTime { get; }

Property Value

DateTime

AppointmentSequenceNumber

Gets the sequence number of this appointment.

public int AppointmentSequenceNumber { get; }

Property Value

int

AppointmentState

Gets the state of this appointment.

public int AppointmentState { get; }

Property Value

int

AppointmentType

Gets a value indicating the type of this appointment.

public AppointmentType AppointmentType { get; }

Property Value

AppointmentType

ConferenceType

Gets or sets the type of conferencing that will be used during the meeting.

public int ConferenceType { get; set; }

Property Value

int

ConflictingMeetingCount

Gets the number of calendar entries that conflict with this appointment in the authenticated user's calendar.

public int ConflictingMeetingCount { get; }

Property Value

int

ConflictingMeetings

Gets a list of meetings that conflict with this appointment in the authenticated user's calendar.

public ItemCollection<Appointment> ConflictingMeetings { get; }

Property Value

ItemCollection<Appointment>

DeletedOccurrences

Gets a list of deleted occurrences for this meeting.

public DeletedOccurrenceInfoCollection DeletedOccurrences { get; }

Property Value

DeletedOccurrenceInfoCollection

Duration

Gets the duration of this appointment.

public TimeSpan Duration { get; }

Property Value

TimeSpan

End

Gets or sets the end time of the appointment.

public DateTime End { get; set; }

Property Value

DateTime

EndTimeZone

Gets or sets time zone of the end property of this appointment.

public TimeZoneInfo EndTimeZone { get; set; }

Property Value

TimeZoneInfo

EnhancedLocation

Gets or sets the Enhanced location object.

public EnhancedLocation EnhancedLocation { get; set; }

Property Value

EnhancedLocation

FirstOccurrence

Gets an OccurrenceInfo identifying the first occurrence of this meeting.

public OccurrenceInfo FirstOccurrence { get; }

Property Value

OccurrenceInfo

ICalDateTimeStamp

Gets the ICalendar DateTimeStamp.

public DateTime? ICalDateTimeStamp { get; }

Property Value

DateTime?

ICalRecurrenceId

Gets the ICalendar RecurrenceId.

public DateTime? ICalRecurrenceId { get; }

Property Value

DateTime?

ICalUid

Gets or sets the ICalendar Uid.

public string ICalUid { get; set; }

Property Value

string

IsAllDayEvent

Gets or sets a value indicating whether this appointment is an all day event.

public bool IsAllDayEvent { get; set; }

Property Value

bool

IsCancelled

Gets a value indicating whether the appointment has been cancelled.

public bool IsCancelled { get; }

Property Value

bool

IsMeeting

Gets a value indicating whether the appointment is a meeting.

public bool IsMeeting { get; }

Property Value

bool

IsOnlineMeeting

Gets or sets a value indicating whether this is an online meeting.

public bool IsOnlineMeeting { get; set; }

Property Value

bool

IsRecurring

Gets a value indicating whether the appointment is recurring.

public bool IsRecurring { get; }

Property Value

bool

IsResponseRequested

Gets or sets a value indicating whether responses are requested when invitations are sent for this meeting.

public bool IsResponseRequested { get; set; }

Property Value

bool

JoinOnlineMeetingUrl

Gets the Url for joining an online meeting

public string JoinOnlineMeetingUrl { get; }

Property Value

string

LastOccurrence

Gets an OccurrenceInfo identifying the last occurrence of this meeting.

public OccurrenceInfo LastOccurrence { get; }

Property Value

OccurrenceInfo

LegacyFreeBusyStatus

Gets or sets a value indicating the free/busy status of the owner of this appointment.

public LegacyFreeBusyStatus LegacyFreeBusyStatus { get; set; }

Property Value

LegacyFreeBusyStatus

Location

Gets or sets the location of this appointment.

public string Location { get; set; }

Property Value

string

MeetingRequestWasSent

Gets a value indicating whether the meeting request has already been sent.

public bool MeetingRequestWasSent { get; }

Property Value

bool

MeetingWorkspaceUrl

Gets or sets the URL of the meeting workspace. A meeting workspace is a shared Web site for planning meetings and tracking results.

public string MeetingWorkspaceUrl { get; set; }

Property Value

string

ModifiedOccurrences

Gets a list of modified occurrences for this meeting.

public OccurrenceInfoCollection ModifiedOccurrences { get; }

Property Value

OccurrenceInfoCollection

MyResponseType

Gets a value indicating what was the last response of the user that loaded this meeting.

public MeetingResponseType MyResponseType { get; }

Property Value

MeetingResponseType

NetShowUrl

Gets or sets the URL of the Microsoft NetShow online meeting.

public string NetShowUrl { get; set; }

Property Value

string

OnlineMeetingSettings

Gets the Online Meeting Settings

public OnlineMeetingSettings OnlineMeetingSettings { get; }

Property Value

OnlineMeetingSettings

OptionalAttendees

Gets a list of optional attendeed for this meeting.

public AttendeeCollection OptionalAttendees { get; }

Property Value

AttendeeCollection

Organizer

Gets the organizer of this meeting. The Organizer property is read-only and is only relevant for attendees. The organizer of a meeting is automatically set to the user that created the meeting.

public EmailAddress Organizer { get; }

Property Value

EmailAddress

OriginalStart

Gets the original start time of this appointment.

public DateTime OriginalStart { get; }

Property Value

DateTime

Recurrence

Gets or sets the recurrence pattern for this appointment. Available recurrence pattern classes include Recurrence.DailyPattern, Recurrence.MonthlyPattern and Recurrence.YearlyPattern.

public Recurrence Recurrence { get; set; }

Property Value

Recurrence

RequiredAttendees

Gets a list of required attendees for this meeting.

public AttendeeCollection RequiredAttendees { get; }

Property Value

AttendeeCollection

Resources

Gets a list of resources for this meeting.

public AttendeeCollection Resources { get; }

Property Value

AttendeeCollection

Start

Gets or sets the start time of the appointment.

public DateTime Start { get; set; }

Property Value

DateTime

StartTimeZone

Gets or sets time zone of the start property of this appointment.

public TimeZoneInfo StartTimeZone { get; set; }

Property Value

TimeZoneInfo

TimeZone

Gets the name of the time zone this appointment is defined in.

public string TimeZone { get; }

Property Value

string

When

Gets a text indicating when this appointment occurs. The text returned by When is localized using the Exchange Server culture or using the culture specified in the PreferredCulture property of the ExchangeService object this appointment is bound to.

public string When { get; }

Property Value

string

Methods

Accept(bool)

Accepts the meeting. Calling this method results in a call to EWS.

public CalendarActionResults Accept(bool sendResponse)

Parameters

sendResponse bool

Indicates whether to send a response to the organizer.

Returns

CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

AcceptTentatively(bool)

Tentatively accepts the meeting. Calling this method results in a call to EWS.

public CalendarActionResults AcceptTentatively(bool sendResponse)

Parameters

sendResponse bool

Indicates whether to send a response to the organizer.

Returns

CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

Bind(ExchangeService, ItemId)

Binds to an existing appointment and loads its first class properties. Calling this method results in a call to EWS.

public static Appointment Bind(ExchangeService service, ItemId id)

Parameters

service ExchangeService

The service to use to bind to the appointment.

id ItemId

The Id of the appointment to bind to.

Returns

Appointment

An Appointment instance representing the appointment corresponding to the specified Id.

Bind(ExchangeService, ItemId, PropertySet)

Binds to an existing appointment and loads the specified set of properties. Calling this method results in a call to EWS.

public static Appointment Bind(ExchangeService service, ItemId id, PropertySet propertySet)

Parameters

service ExchangeService

The service to use to bind to the appointment.

id ItemId

The Id of the appointment to bind to.

propertySet PropertySet

The set of properties to load.

Returns

Appointment

An Appointment instance representing the appointment corresponding to the specified Id.

BindToOccurrence(ExchangeService, ItemId, int)

Binds to an occurence of an existing appointment and loads its first class properties. Calling this method results in a call to EWS.

public static Appointment BindToOccurrence(ExchangeService service, ItemId recurringMasterId, int occurenceIndex)

Parameters

service ExchangeService

The service to use to bind to the appointment.

recurringMasterId ItemId

The Id of the recurring master that the index represents an occurrence of.

occurenceIndex int

The index of the occurrence.

Returns

Appointment

An Appointment instance representing the appointment occurence corresponding to the specified occurence index .

BindToOccurrence(ExchangeService, ItemId, int, PropertySet)

Binds to an occurence of an existing appointment and loads the specified set of properties. Calling this method results in a call to EWS.

public static Appointment BindToOccurrence(ExchangeService service, ItemId recurringMasterId, int occurenceIndex, PropertySet propertySet)

Parameters

service ExchangeService

The service to use to bind to the appointment.

recurringMasterId ItemId

The Id of the recurring master that the index represents an occurrence of.

occurenceIndex int

The index of the occurrence.

propertySet PropertySet

The set of properties to load.

Returns

Appointment

An Appointment instance representing the appointment occurence corresponding to the specified occurence index.

BindToRecurringMaster(ExchangeService, ItemId)

Binds to the master appointment of a recurring series and loads its first class properties. Calling this method results in a call to EWS.

public static Appointment BindToRecurringMaster(ExchangeService service, ItemId occurrenceId)

Parameters

service ExchangeService

The service to use to bind to the appointment.

occurrenceId ItemId

The Id of one of the occurrences in the series.

Returns

Appointment

An Appointment instance representing the master appointment of the recurring series to which the specified occurrence belongs.

BindToRecurringMaster(ExchangeService, ItemId, PropertySet)

Binds to the master appointment of a recurring series and loads the specified set of properties. Calling this method results in a call to EWS.

public static Appointment BindToRecurringMaster(ExchangeService service, ItemId occurrenceId, PropertySet propertySet)

Parameters

service ExchangeService

The service to use to bind to the appointment.

occurrenceId ItemId

The Id of one of the occurrences in the series.

propertySet PropertySet

The set of properties to load.

Returns

Appointment

An Appointment instance representing the master appointment of the recurring series to which the specified occurrence belongs.

CancelMeeting()

Cancels the meeting and sends cancellation messages to all attendees. Calling this method results in a call to EWS.

public CalendarActionResults CancelMeeting()

Returns

CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

CancelMeeting(string)

Cancels the meeting and sends cancellation messages to all attendees. Calling this method results in a call to EWS.

public CalendarActionResults CancelMeeting(string cancellationMessageText)

Parameters

cancellationMessageText string

Cancellation message text sent to all attendees.

Returns

CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

CreateAcceptMessage(bool)

Creates a local meeting acceptance message that can be customized and sent.

public AcceptMeetingInvitationMessage CreateAcceptMessage(bool tentative)

Parameters

tentative bool

Specifies whether the meeting will be tentatively accepted.

Returns

AcceptMeetingInvitationMessage

An AcceptMeetingInvitationMessage representing the meeting acceptance message.

CreateCancelMeetingMessage()

Creates a local meeting cancellation message that can be customized and sent.

public CancelMeetingMessage CreateCancelMeetingMessage()

Returns

CancelMeetingMessage

A CancelMeetingMessage representing the meeting cancellation message.

CreateDeclineMessage()

Creates a local meeting declination message that can be customized and sent.

public DeclineMeetingInvitationMessage CreateDeclineMessage()

Returns

DeclineMeetingInvitationMessage

A DeclineMeetingInvitation representing the meeting declination message.

CreateForward()

Creates a forward message from this appointment.

public ResponseMessage CreateForward()

Returns

ResponseMessage

A ResponseMessage representing the forward response that can subsequently be modified and sent.

CreateReply(bool)

Creates a reply response to the organizer and/or attendees of the meeting.

public ResponseMessage CreateReply(bool replyAll)

Parameters

replyAll bool

Indicates whether the reply should go to the organizer only or to all the attendees.

Returns

ResponseMessage

A ResponseMessage representing the reply response that can subsequently be modified and sent.

Decline(bool)

Declines the meeting invitation. Calling this method results in a call to EWS.

public CalendarActionResults Decline(bool sendResponse)

Parameters

sendResponse bool

Indicates whether to send a response to the organizer.

Returns

CalendarActionResults

A CalendarActionResults object containing the various items that were created or modified as a results of this operation.

Delete(DeleteMode, SendCancellationsMode)

Deletes this appointment. Calling this method results in a call to EWS.

public void Delete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode)

Parameters

deleteMode DeleteMode

The deletion mode.

sendCancellationsMode SendCancellationsMode

Specifies if and how cancellations should be sent if this appointment is a meeting.

Forward(MessageBody, params EmailAddress[])

Forwards the appointment. Calling this method results in a call to EWS.

public void Forward(MessageBody bodyPrefix, params EmailAddress[] toRecipients)

Parameters

bodyPrefix MessageBody

The prefix to prepend to the original body of the message.

toRecipients EmailAddress[]

The recipients to forward the appointment to.

Forward(MessageBody, IEnumerable<EmailAddress>)

Forwards the appointment. Calling this method results in a call to EWS.

public void Forward(MessageBody bodyPrefix, IEnumerable<EmailAddress> toRecipients)

Parameters

bodyPrefix MessageBody

The prefix to prepend to the original body of the message.

toRecipients IEnumerable<EmailAddress>

The recipients to forward the appointment to.

Reply(MessageBody, bool)

Replies to the organizer and/or the attendees of the meeting. Calling this method results in a call to EWS.

public void Reply(MessageBody bodyPrefix, bool replyAll)

Parameters

bodyPrefix MessageBody

The prefix to prepend to the body of the meeting.

replyAll bool

Indicates whether the reply should go to the organizer only or to all the attendees.

Save(FolderId, SendInvitationsMode)

Saves this appointment in the specified folder. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added.

public void Save(FolderId destinationFolderId, SendInvitationsMode sendInvitationsMode)

Parameters

destinationFolderId FolderId

The Id of the folder in which to save this appointment.

sendInvitationsMode SendInvitationsMode

Specifies if and how invitations should be sent if this appointment is a meeting.

Save(SendInvitationsMode)

Saves this appointment in the Calendar folder. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added.

public void Save(SendInvitationsMode sendInvitationsMode)

Parameters

sendInvitationsMode SendInvitationsMode

Specifies if and how invitations should be sent if this appointment is a meeting.

Save(WellKnownFolderName, SendInvitationsMode)

Saves this appointment in the specified folder. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added.

public void Save(WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode)

Parameters

destinationFolderName WellKnownFolderName

The name of the folder in which to save this appointment.

sendInvitationsMode SendInvitationsMode

Specifies if and how invitations should be sent if this appointment is a meeting.

Update(ConflictResolutionMode, SendInvitationsOrCancellationsMode)

Applies the local changes that have been made to this appointment. Calling this method results in at least one call to EWS. Mutliple calls to EWS might be made if attachments have been added or removed.

public void Update(ConflictResolutionMode conflictResolutionMode, SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode)

Parameters

conflictResolutionMode ConflictResolutionMode

Specifies how conflicts should be resolved.

sendInvitationsOrCancellationsMode SendInvitationsOrCancellationsMode

Specifies if and how invitations or cancellations should be sent if this appointment is a meeting.