DeleteItems method

Future<void> DeleteItems(
  1. FolderId? contextFolderId,
  2. DeleteMode deleteMode
)
Deletes items in the specified conversation. Calling this method results in a call to EWS. The Id of the folder items must belong to in order to be deleted. If contextFolderId is null, items across the entire mailbox are deleted. The deletion mode.

Implementation

Future<void> DeleteItems(
  FolderId? contextFolderId,
  DeleteMode deleteMode,
) async {
  // ExchangeService.DeleteItemsInConversations
  (await _ApplyConversationOneTimeAction(
    ConversationActionType.Delete,
    [MapEntry(Id!, GlobalLastDeliveryTime)],
    contextFolderId,
    null,
    deleteMode,
    null,
    null,
    null,
    null,
    null,
    ServiceErrorHandling.ReturnErrors,
  ))[0].ThrowIfNecessary();
}