我想创建约会,而不是 session :
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.
这是为什么呢?我是否忽略了文档中的任何内容?
最佳答案
EWS 对 session 和约会使用相同的对象类型。 Save()
或 Update()
约会时的默认行为是发送 session 邀请,即使您没有邀请任何人。这实际上将 IsMeeting 设置为 true。要将其保存为约会,请将用于保存的代码行更改为:
app.Save(SendInvitationsMode.SendToNone);
这将阻止发送邀请,并将 IsMeeting 设置为 false。
关于c# - Appointment.Save 和 Appointment.Update 始终将 IsMeeting 设置为 true,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23105331/