InternalDelete method

Future<void> InternalDelete(
  1. DeleteMode deleteMode,
  2. SendCancellationsMode? sendCancellationsMode,
  3. AffectedTaskOccurrence? affectedTaskOccurrences, [
  4. bool suppressReadReceipts = false,
])
override
Deletes the object. The deletion mode. Indicates whether meeting cancellation messages should be sent. Indicate which occurrence of a recurring task should be deleted. Whether to suppress read receipts

Implementation

Future<void> InternalDelete(
    DeleteMode deleteMode,
    SendCancellationsMode? sendCancellationsMode,
    AffectedTaskOccurrence? affectedTaskOccurrences,
    [bool suppressReadReceipts = false]) {
  this.ThrowIfThisIsNew();
  this.ThrowIfThisIsAttachment();

  // If sendCancellationsMode is null, use the default value that's appropriate for item type.
  if (sendCancellationsMode == null) {
    sendCancellationsMode = this.DefaultSendCancellationsMode;
  }

  // If affectedTaskOccurrences is null, use the default value that's appropriate for item type.
  if (affectedTaskOccurrences == null) {
    affectedTaskOccurrences = this.DefaultAffectedTaskOccurrences;
  }

  return this.Service.DeleteItem(this.Id, deleteMode, sendCancellationsMode,
      affectedTaskOccurrences, suppressReadReceipts);
}