UpdateItems method
Future<ServiceResponseCollection<UpdateItemResponse> >
UpdateItems(
- Iterable<
Item> items, - FolderId savedItemsDestinationFolderId,
- ConflictResolutionMode conflictResolution,
- MessageDisposition messageDisposition,
- SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode,
- bool suppressReadReceipts,
Implementation
//ServiceResponseCollection<UpdateItemResponse> UpdateItems(
// Iterable<Item> items,
// FolderId savedItemsDestinationFolderId,
// ConflictResolutionMode conflictResolution,
// MessageDisposition? messageDisposition,
// SendInvitationsOrCancellationsMode? sendInvitationsOrCancellationsMode)
// {
// return this.UpdateItems(items, savedItemsDestinationFolderId, conflictResolution, messageDisposition, sendInvitationsOrCancellationsMode, false);
// }
/// <summary>
/// Updates multiple items in a single EWS call. UpdateItems does not support items that have unsaved attachments.
/// </summary>
/// <param name="items">The items to update.</param>
/// <param name="savedItemsDestinationFolderId">The folder in which to save sent messages, meeting invitations or cancellations. If null, the messages, meeting invitation or cancellations are saved in the Sent Items folder.</param>
/// <param name="conflictResolution">The conflict resolution mode.</param>
/// <param name="messageDisposition">Indicates the disposition mode for items of type EmailMessage. Required if items contains at least one EmailMessage instance.</param>
/// <param name="sendInvitationsOrCancellationsMode">Indicates if and how invitations and/or cancellations should be sent for items of type Appointment. Required if items contains at least one Appointment instance.</param>
/// <param name="suppressReadReceipts">Whether to suppress read receipts</param>
/// <returns>A ServiceResponseCollection providing update results for each of the specified items.</returns>
Future<ServiceResponseCollection<UpdateItemResponse>> UpdateItems(
Iterable<Item> items,
FolderId savedItemsDestinationFolderId,
ConflictResolutionMode conflictResolution,
MessageDisposition messageDisposition,
SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode,
bool suppressReadReceipts) {
// All items have to exist on the server (!new) and modified (dirty)
if (!items.every((item) => (!item.IsNew && item.IsDirty))) {
throw new ServiceValidationException(
"Strings.UpdateItemsDoesNotSupportNewOrUnchangedItems");
}
// Make sure that all items do *not* have unprocessed attachments.
if (!items.every((item) => !item.HasUnprocessedAttachmentChanges())) {
throw new ServiceValidationException(
"Strings.UpdateItemsDoesNotAllowAttachments");
}
return this.InternalUpdateItems(
items,
savedItemsDestinationFolderId,
conflictResolution,
messageDisposition,
sendInvitationsOrCancellationsMode,
ServiceErrorHandling.ReturnErrors,
suppressReadReceipts);
}