EWS管理:获取约会的必需和可选参加者

问题描述 投票:3回答:1

就我而言,我知道如何从交换服务器获取约会,但是只要我想看到所需的和可选的与会者,这些字段都是空的......我检查了约会,并且有一位与会者,除了我。我是否必须以不同方式配置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);

这就是我如何获取约会,正如我从例外和追踪和错误中所知,我不需要交换参与者...但也许我错过了一些东西。

exchange-server exchangewebservices exchange-server-2007 ews-managed-api
1个回答
5
投票

FindAppointments操作不会返回会议的与会者。相反,请指定PropertySet.IdOnly的属性集以仅获取项的ID。然后,使用ExchangeService.LoadPropertiesForItems执行所需属性的批量加载。

© www.soinside.com 2019 - 2024. All rights reserved.