CreateItem method
Future<void>
CreateItem(
- Item item,
- FolderId? parentFolderId,
- MessageDisposition? messageDisposition,
- SendInvitationsMode? sendInvitationsMode,
Implementation
//ServiceResponseCollection<ServiceResponse> CreateItems(
// Iterable<Item> items,
// FolderId parentFolderId,
// MessageDisposition? messageDisposition,
// SendInvitationsMode? sendInvitationsMode)
// {
// // All items have to be new.
// if (!items.TrueForAll((item) => item.IsNew))
// {
// throw new ServiceValidationException(Strings.CreateItemsDoesNotHandleExistingItems);
// }
//
// // Make sure that all items do *not* have unprocessed attachments.
// if (!items.TrueForAll((item) => !item.HasUnprocessedAttachmentChanges()))
// {
// throw new ServiceValidationException(Strings.CreateItemsDoesNotAllowAttachments);
// }
//
// return this.InternalCreateItems(
// items,
// parentFolderId,
// messageDisposition,
// sendInvitationsMode,
// ServiceErrorHandling.ReturnErrors);
// }
/// <summary>
/// Creates an item. Calling this method results in a call to EWS.
/// </summary>
/// <param name="item">The item to create.</param>
/// <param name="parentFolderId">The Id of the folder in which to place the newly created item. If null, the item is created in its default folders.</param>
/// <param name="messageDisposition">Indicates the disposition mode for items of type EmailMessage. Required if item is an EmailMessage instance.</param>
/// <param name="sendInvitationsMode">Indicates if and how invitations should be sent for item of type Appointment. Required if item is an Appointment instance.</param>
Future<void> CreateItem(
Item item,
FolderId? parentFolderId,
MessageDisposition? messageDisposition,
SendInvitationsMode? sendInvitationsMode) {
return this.InternalCreateItems([item], parentFolderId, messageDisposition,
sendInvitationsMode, ServiceErrorHandling.ThrowOnError);
}