InternalUpdate method

Future<Item?> InternalUpdate(
  1. FolderId? parentFolderId,
  2. ConflictResolutionMode conflictResolutionMode,
  3. MessageDisposition messageDisposition,
  4. SendInvitationsOrCancellationsMode? sendInvitationsOrCancellationsMode, [
  5. bool suppressReadReceipts = false,
])
Update item. The parent folder id. The conflict resolution mode. The message disposition. The send invitations or cancellations mode. Update item. The parent folder id. The conflict resolution mode. The message disposition. The send invitations or cancellations mode. Whether to suppress read receipts

Implementation

//        Item InternalUpdate(
//            FolderId parentFolderId,
//            ConflictResolutionMode conflictResolutionMode,
//            MessageDisposition? messageDisposition,
//            SendInvitationsOrCancellationsMode? sendInvitationsOrCancellationsMode)
//        {
//            return this.InternalUpdate(parentFolderId, conflictResolutionMode, messageDisposition, sendInvitationsOrCancellationsMode, false);
//        }

/// <summary>
/// Update item.
/// </summary>
/// <param name="parentFolderId">The parent folder id.</param>
/// <param name="conflictResolutionMode">The conflict resolution mode.</param>
/// <param name="messageDisposition">The message disposition.</param>
/// <param name="sendInvitationsOrCancellationsMode">The send invitations or cancellations mode.</param>
/// <param name="suppressReadReceipts">Whether to suppress read receipts</param>
/// <returns>Updated item.</returns>
Future<Item?> InternalUpdate(
    FolderId? parentFolderId,
    ConflictResolutionMode conflictResolutionMode,
    MessageDisposition messageDisposition,
    SendInvitationsOrCancellationsMode? sendInvitationsOrCancellationsMode,
    [bool suppressReadReceipts = false]) async {
  this.ThrowIfThisIsNew();
  this.ThrowIfThisIsAttachment();

  Item? returnedItem = null;

  if (this.IsDirty && this.PropertyBag.GetIsUpdateCallNecessary()) {
    returnedItem = await this.Service.UpdateItem(
        this,
        parentFolderId,
        conflictResolutionMode,
        messageDisposition,
        sendInvitationsOrCancellationsMode ??
            this.DefaultSendInvitationsOrCancellationsMode,
        suppressReadReceipts);
  }

  // Regardless of whether item is dirty or not, if it has unprocessed
  // attachment changes, validate them and process now.
  if (this.HasUnprocessedAttachmentChanges()) {
    this.Attachments.Validate();
    await this.Attachments.Save();
  }

  return returnedItem;
}