Example #1
0
 /// <summary>
 /// Saves this appointment in the Calendar folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public void Save(SendInvitationsMode sendInvitationsMode)
 {
     this.InternalCreate(
         null,
         null,
         sendInvitationsMode);
 }
Example #2
0
 /// <summary>
 /// Saves this appointment in the Calendar folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public System.Threading.Tasks.Task Save(SendInvitationsMode sendInvitationsMode)
 {
     return(this.InternalCreate(
                null,
                null,
                sendInvitationsMode));
 }
Example #3
0
 /// <summary>
 /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="destinationFolderName">The name of the folder in which to save this appointment.</param>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public void Save(WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode)
 {
     this.InternalCreate(
         new FolderId(destinationFolderName),
         null,
         sendInvitationsMode);
 }
 /// <summary>
 /// Saves this appointment in the Calendar folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public System.Threading.Tasks.Task Save(SendInvitationsMode sendInvitationsMode, CancellationToken token = default(CancellationToken))
 {
     return(this.InternalCreate(
                null,
                null,
                sendInvitationsMode,
                token));
 }
Example #5
0
        /// <summary>
        /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
        /// Mutliple calls to EWS might be made if attachments have been added.
        /// </summary>
        /// <param name="destinationFolderId">The Id of the folder in which to save this appointment.</param>
        /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
        public System.Threading.Tasks.Task Save(FolderId destinationFolderId, SendInvitationsMode sendInvitationsMode)
        {
            EwsUtilities.ValidateParam(destinationFolderId, "destinationFolderId");

            return(this.InternalCreate(
                       destinationFolderId,
                       null,
                       sendInvitationsMode));
        }
Example #6
0
        /// <summary>
        /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
        /// Mutliple calls to EWS might be made if attachments have been added.
        /// </summary>
        /// <param name="destinationFolderId">The Id of the folder in which to save this appointment.</param>
        /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
        public void Save(FolderId destinationFolderId, SendInvitationsMode sendInvitationsMode)
        {
            EwsUtilities.ValidateParam(destinationFolderId, "destinationFolderId");

            this.InternalCreate(
                destinationFolderId,
                null,
                sendInvitationsMode);
        }
        /// <summary>
        /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
        /// Mutliple calls to EWS might be made if attachments have been added.
        /// </summary>
        /// <param name="destinationFolderId">The Id of the folder in which to save this appointment.</param>
        /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
        public System.Threading.Tasks.Task Save(FolderId destinationFolderId, SendInvitationsMode sendInvitationsMode, CancellationToken token = default(CancellationToken))
        {
            EwsUtilities.ValidateParam(destinationFolderId, "destinationFolderId");

            return(this.InternalCreate(
                       destinationFolderId,
                       null,
                       sendInvitationsMode,
                       token));
        }
        private void lbOptions_SelectedIndexChanged(object sender, EventArgs e)
        {
            SelectedOption = lbOptions.SelectedItem.ToString();

            switch (SelectedOption)
            {
            case "SendOnlyToAll":
                SelectedSendInvitationsMode = SendInvitationsMode.SendOnlyToAll;
                break;

            case "SendToAllAndSaveCopy":
                SelectedSendInvitationsMode = SendInvitationsMode.SendToAllAndSaveCopy;
                break;

            case "SendToNone":
                SelectedSendInvitationsMode = SendInvitationsMode.SendToNone;
                break;
            }
        }
Example #9
0
 /// <summary>
 /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="destinationFolderName">The name of the folder in which to save this appointment.</param>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public System.Threading.Tasks.Task Save(WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode)
 {
     return(this.InternalCreate(
                new FolderId(destinationFolderName),
                null,
                sendInvitationsMode));
 }
 /// <summary>
 /// Saves this appointment in the Calendar folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public void Save(SendInvitationsMode sendInvitationsMode)
 {
     this.InternalCreate(
         null,
         null,
         sendInvitationsMode);
 }
        /// <summary>
        /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
        /// Mutliple calls to EWS might be made if attachments have been added.
        /// </summary>
        /// <param name="destinationFolderId">The Id of the folder in which to save this appointment.</param>
        /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
        public void Save(FolderId destinationFolderId, SendInvitationsMode sendInvitationsMode)
        {
            EwsUtilities.ValidateParam(destinationFolderId, "destinationFolderId");

            this.InternalCreate(
                destinationFolderId,
                null,
                sendInvitationsMode);
        }
 /// <summary>
 /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="destinationFolderName">The name of the folder in which to save this appointment.</param>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public void Save(WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode)
 {
     this.InternalCreate(
         new FolderId(destinationFolderName),
         null,
         sendInvitationsMode);
 }
Example #13
0
        /// <summary>
        /// Create item.
        /// </summary>
        /// <param name="parentFolderId">The parent folder id.</param>
        /// <param name="messageDisposition">The message disposition.</param>
        /// <param name="sendInvitationsMode">The send invitations mode.</param>
        internal void InternalCreate(
            FolderId parentFolderId,
            MessageDisposition? messageDisposition,
            SendInvitationsMode? sendInvitationsMode)
        {
            this.ThrowIfThisIsNotNew();
            this.ThrowIfThisIsAttachment();

            if (this.IsNew || this.IsDirty)
            {
                this.Service.CreateItem(
                    this,
                    parentFolderId,
                    messageDisposition,
                    sendInvitationsMode.HasValue ? sendInvitationsMode : this.DefaultSendInvitationsMode);

                this.Attachments.Save();
            }
        }
 /// <summary>
 /// Saves this appointment in the specified folder. Calling this method results in at least one call to EWS.
 /// Mutliple calls to EWS might be made if attachments have been added.
 /// </summary>
 /// <param name="destinationFolderName">The name of the folder in which to save this appointment.</param>
 /// <param name="sendInvitationsMode">Specifies if and how invitations should be sent if this appointment is a meeting.</param>
 public System.Threading.Tasks.Task Save(WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode, CancellationToken token = default(CancellationToken))
 {
     return(this.InternalCreate(
                new FolderId(destinationFolderName),
                null,
                sendInvitationsMode,
                token));
 }
Example #15
0
        /// <summary>
        /// Create item.
        /// </summary>
        /// <param name="parentFolderId">The parent folder id.</param>
        /// <param name="messageDisposition">The message disposition.</param>
        /// <param name="sendInvitationsMode">The send invitations mode.</param>
        internal async System.Threading.Tasks.Task InternalCreateAsync(
            FolderId parentFolderId,
            MessageDisposition? messageDisposition,
            SendInvitationsMode? sendInvitationsMode)
        {
            this.ThrowIfThisIsNotNew();
            this.ThrowIfThisIsAttachment();

            if (this.IsNew || this.IsDirty)
            {
                await this.Service.CreateItemAsync(
                    this,
                    parentFolderId,
                    messageDisposition,
                    sendInvitationsMode.HasValue ? sendInvitationsMode : this.DefaultSendInvitationsMode);

                await this.Attachments.SaveAsync();
            }
        }