问题
I want to create appointments, not meetings:
Appointment app = new Appointment(ews);
app.Start = DateTime.Now;
app.End = DateTime.Now.AddMinutes(60);
app.Subject = "My Subject";
app.Save();
string unid = app.Id.UniqueId;
// here the unid is given to the client, that may make another call leading to:
ItemId iid = new ItemId(unid);
app = Appointment.Bind(ews, iid, calendarFullEntryProperties);
return app.IsMeeting; // Will return true, although I never added any participants.
Why is that? Did I overlook anything in the docs?
回答1:
EWS uses the same object type for meetings and appointments. The default behavior when you Save()
or Update()
an appointment is to send meeting invitations even if you haven't invited anyone. This essentially sets the IsMeeting to true. To save this as an appointment, change your line of code for saving to this:
app.Save(SendInvitationsMode.SendToNone);
This will keep invitations from being sent and keep IsMeeting set to false.
来源:https://stackoverflow.com/questions/23105331/appointment-save-and-appointment-update-always-set-ismeeting-to-true