gpt4 book ai didi

c# - Appointment.Save 和 Appointment.Update 始终将 IsMeeting 设置为 true

转载 作者:行者123 更新时间:2023-11-30 20:49:48 24 4
gpt4 key购买 nike

我想创建约会,而不是 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com