use*_*947 6 c# service exchange-server exchangewebservices
我很难过.我正在使用Exchange Web服务从我公司的本地日历和其他日历中检索日历信息,但".Resources"始终为空.我们使用Resources来存储会议室信息.有趣的是,即使".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
...
Run Code Online (Sandbox Code Playgroud)
谢谢,格雷格
小智 1
默认情况下,EWS 可能不会请求该Resources属性,但您应该能够通过将其添加到PropertySet调用之前来明确请求该属性FindAppointments。
calendarView.PropertySet.Add(AppointmentSchema.Resources);
Run Code Online (Sandbox Code Playgroud)