Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Event UpdateRecurrentEvents(Event calendarEvent)
- {
- Appointment recurringMaster = null;
- // Get the Appoinment by Id
- Appointment appointment = FindItem(calendarEvent.EventId.UniqueId);
- var properties = GetLoadProperties(CalendarEventLightweightType.None);
- appointment.Load(properties);
- if (appointment == null)
- {
- throw new ResourceNotFoundException("Exchange: Appointment was not found in the organizer's calendar.");
- }
- // the code is the same like in the link
- // Update the series.
- try
- {
- // This method results in a call to EWS.
- recurringMaster.Update(ConflictResolutionMode.AutoResolve,
- meeting == null
- ? SendInvitationsOrCancellationsMode.SendToNone
- : SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy);
- properties = GetLoadProperties(CalendarEventLightweightType.None);
- recurringMaster.Load(properties);
- recurringMaster.TryGetProperty(extendedPlainTextBody, out plainTextBody);
- }
- catch (Exception ex)
- {
- Log.ErrorFormat("Exchange service error: {0}.", ex.Message);
- throw new GatewayServiceException("Exchange service error", ex);
- }
- return //custom mapper
- }
- at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary()
- at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
- at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalUpdateItems(IEnumerable`1 items, FolderId savedItemsDestinationFolderId, ConflictResolutionMode conflictResolution, Nullable`1 messageDisposition, Nullable`1 sendInvitationsOrCancellationsMode, ServiceErrorHandling errorHandling, Boolean suppressReadReceipt)
- at Microsoft.Exchange.WebServices.Data.ExchangeService.UpdateItem(Item item, FolderId savedItemsDestinationFolderId, ConflictResolutionMode conflictResolution, Nullable`1 messageDisposition, Nullable`1 sendInvitationsOrCancellationsMode, Boolean suppressReadReceipts)
- at Microsoft.Exchange.WebServices.Data.Item.InternalUpdate(FolderId parentFolderId, ConflictResolutionMode conflictResolutionMode, Nullable`1 messageDisposition, Nullable`1 sendInvitationsOrCancellationsMode, Boolean suppressReadReceipts)
- at Microsoft.Exchange.WebServices.Data.Item.Update(ConflictResolutionMode conflictResolutionMode, Boolean suppressReadReceipts)
- at Microsoft.Exchange.WebServices.Data.Item.Update(ConflictResolutionMode conflictResolutionMode)
Add Comment
Please, Sign In to add comment