我很困惑我正在使用Exchange Web服务从公司的本地日历和其他日历中检索日历信息,但是“.Resources”始终为空。我们使用资源来存储 session 室信息。有趣的是,即使“.RequiredAttendees”为空,但我也可以毫无问题地从“.DisplayTo”和“.DisplayCc”中检索值。有什么建议么?我在下面提供了一个应付代码段,以供引用。

  CalendarView calendarView = new CalendarView(startDate, endDate);
  Mailbox mailbox = new Mailbox(mailboxSMTP);
  FolderId calendarFolder = new FolderId(WellKnownFolderName.Calendar, mailbox);
  FindItemsResults<Appointment> findResults = service.FindAppointments(calendarFolder, calendarView);

  foreach (Appointment appointment in findResults.Items)
  {// foreach 1
      ...

谢谢,
格雷格

最佳答案

默认情况下,EWS可能不请求Resources属性,但是您应该能够通过在调用PropertySet之前将其添加到FindAppointments中来专门请求它。

calendarView.PropertySet.Add(AppointmentSchema.Resources);

10-07 15:45