问题描述
我很困惑.我正在使用Exchange Web服务从公司的本地日历和其他日历中检索日历信息,但是".Resources"始终为空.我们使用资源来存储会议室信息.有趣的是,即使".RequiredAttendees"为空,但我也可以毫无问题地从".DisplayTo"和".DisplayCc"中检索值.有什么建议?我在下面附上了一个摘要,以供参考.
I'm stumped. I'm using Exchange Web Services to retrieve calendar information from both my local and other calendars in my company, but the ".Resources" are always empty. We use Resources to store conference room information. Interestingly even ".RequiredAttendees" is empty, but I can retrieve values from the ".DisplayTo" and ".DisplayCc" without issue. Any suggestions? I have included a cope snippet below for reference.
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中来专门请求它>.
EWS may not request the Resources
property by default, but you should be able to specifically request it by adding it to the PropertySet
before calling FindAppointments
.
calendarView.PropertySet.Add(AppointmentSchema.Resources);
这篇关于无法从Exchange Web服务检索资源(房间)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!