0

我正在为每个现有约会设置一个自定义扩展属性,如下所示:

var extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "RateTheMeetingId24", MapiPropertyType.Integer);
var propertySet = new PropertySet(PropertySet.FirstClassProperties) { extendedPropertyDefinition };
appointment.Load(propertySet);
appointment.SetExtendedProperty(extendedPropertyDefinition, meetingId);

而不是我更新约会:

appointment.Update(ConflictResolutionMode.AlwaysOverwrite);

它工作得很好,但很慢,因为 Update() 会创建一个调用来交换每个约会。我想在一个电话中更新会议。我可以使用设置的自定义属性列出我的约会,而不是我想使用类似的东西:

UpdateAppointment(List<Appointment> appointmentsWithExtendedPropertySetted)
{
    appointmentsWithExtendedPropertySetted.UpdateAll();
}

我在 MSDN 中找到了有关 UpdateItems 方法的参考: ExchangeService.UpdateItems 方法

但我不知道如何使用它。

4

1 回答 1

0

我知道如何解决我在 msdn 论坛中的问题: 在一个服务呼叫中更新约会

我需要当时为一个约会设置属性,然后将其添加到批处理中,在我为所有约会设置属性后,我需要为我的约会批处理使用 _service.UpdateItems() 方法:

pulic void UpdateAppointments(List<Item> _updateBatch)
{
    Service.UpdateItems(upUpdateBatch, Folder.Id, ConflictResolutionMode.AlwaysOverwrite, MessageDisposition.SaveOnly, SendInvitationsOrCancellationsMode.SendToNone);
}
于 2013-08-01T10:10:06.957 回答