InternalCreateItems method

Future<ServiceResponseCollection<ServiceResponse>> InternalCreateItems(
  1. Iterable<Item> items,
  2. FolderId? parentFolderId,
  3. MessageDisposition? messageDisposition,
  4. SendInvitationsMode? sendInvitationsMode,
  5. ServiceErrorHandling errorHandling,
)
Marks all items in folder as read/unread. Calling this method results in a call to EWS. The folder id. If true, items marked as read, otherwise unread. If true, suppress read receipts for items. Creates multiple items in a single EWS call. Supported item classes are EmailMessage, Appointment, Contact, PostItem, Task and Item. CreateItems does not support items that have unsaved attachments. The items to create. The Id of the folder in which to place the newly created items. If null, items are created in their default folders. Indicates the disposition mode for items of type EmailMessage. Required if items contains at least one EmailMessage instance. Indicates if and how invitations should be sent for items of type Appointment. Required if items contains at least one Appointment instance. What type of error handling should be performed.

Implementation

//        void MarkAllItemsAsRead(
//            FolderId folderId,
//            bool readFlag,
//            bool suppressReadReceipts)
//        {
//            EwsUtilities.ValidateParam(folderId, "folderId");
//            EwsUtilities.ValidateMethodVersion(this, ExchangeVersion.Exchange2013, "MarkAllItemsAsRead");
//
//            MarkAllItemsAsReadRequest request = new MarkAllItemsAsReadRequest(this, ServiceErrorHandling.ThrowOnError);
//
//            request.FolderIds.Add(folderId);
//            request.ReadFlag = readFlag;
//            request.SuppressReadReceipts = suppressReadReceipts;
//
//            request.Execute();
//        }

/// <summary>
/// Creates multiple items in a single EWS call. Supported item classes are EmailMessage, Appointment, Contact, PostItem, Task and Item.
/// CreateItems does not support items that have unsaved attachments.
/// </summary>
/// <param name="items">The items to create.</param>
/// <param name="parentFolderId">The Id of the folder in which to place the newly created items. If null, items are created in their default folders.</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="sendInvitationsMode">Indicates if and how invitations should be sent for items of type Appointment. Required if items contains at least one Appointment instance.</param>
/// <param name="errorHandling">What type of error handling should be performed.</param>
/// <returns>A ServiceResponseCollection providing creation results for each of the specified items.</returns>
Future<ServiceResponseCollection<ServiceResponse>> InternalCreateItems(
    Iterable<Item> items,
    FolderId? parentFolderId,
    MessageDisposition? messageDisposition,
    SendInvitationsMode? sendInvitationsMode,
    ServiceErrorHandling errorHandling) {
  CreateItemRequest request = new CreateItemRequest(this, errorHandling);

  request.ParentFolderId = parentFolderId;
  request.Items = items;
  request.MessageDisposition = messageDisposition;
  request.SendInvitationsMode = sendInvitationsMode;

  return request.Execute();
}