就我现在而言,我知道如何从交换服务器获取约会,但是当我想看到必需和可选的与会者时,这些字段是空的......我检查了约会 trice 并且有一个与会者,除了我。我是否必须以不同方式配置 Outlook,或者我是否遗漏了什么?
List<Appointment> listOfAppointments = new List<Appointment>();
CalendarFolder cfolder = CalendarFolder.Bind(MyService, WellKnownFolderName.Calendar);
CalendarView cview = new CalendarView(from.ToUniversalTime(), to.ToUniversalTime());
cview.PropertySet = new PropertySet(ItemSchema.Subject);
cview.PropertySet.Add(AppointmentSchema.Start);
cview.PropertySet.Add(AppointmentSchema.End);
cview.PropertySet.Add(AppointmentSchema.Location);
cview.PropertySet.Add(AppointmentSchema.ICalUid);
cview.PropertySet.Add(AppointmentSchema.Organizer);
cview.PropertySet.Add(AppointmentSchema.IsAllDayEvent);
cview.PropertySet.Add(AppointmentSchema.DateTimeCreated);
FindItemsResults<Appointment> result = cfolder.FindAppointments(cview);
这就是我获取约会的方式,正如我从异常、跟踪和错误中得出的那样,我不需要要求交换参加者……但也许我遗漏了什么。
最佳答案
FindAppointments 操作不返回 session 的参加者。相反,指定 PropertySet.IdOnly 的属性集以仅获取项目的 ID。然后,使用 ExchangeService.LoadPropertiesForItems 执行所需属性的批量加载。
关于exchange-server - EWS 管理的 : Fetch required and optional attendees of appointments,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7473165/