Exemple #1
0
        public void MergeWith(EmailInstanceSettingsModel emailInstanceSettingsModel)
        {
            if (emailInstanceSettingsModel.Subject != null &&
                emailInstanceSettingsModel.Subject.Count > 0)
            {
                Subject = emailInstanceSettingsModel.Subject;
            }

            if (emailInstanceSettingsModel.Title != null &&
                emailInstanceSettingsModel.Title.Count > 0)
            {
                Title = emailInstanceSettingsModel.Title;
            }

            if (emailInstanceSettingsModel.PreHeader != null &&
                emailInstanceSettingsModel.PreHeader.Count > 0)
            {
                PreHeader = emailInstanceSettingsModel.PreHeader;
            }

            if (emailInstanceSettingsModel.TextPrefix != null &&
                emailInstanceSettingsModel.TextPrefix.Count > 0)
            {
                TextPrefix = emailInstanceSettingsModel.TextPrefix;
            }

            if (emailInstanceSettingsModel.TextSuffix != null &&
                emailInstanceSettingsModel.TextSuffix.Count > 0)
            {
                TextSuffix = emailInstanceSettingsModel.TextSuffix;
            }

            if (emailInstanceSettingsModel.Button != null &&
                emailInstanceSettingsModel.Button.Count > 0)
            {
                Button = emailInstanceSettingsModel.Button;
            }

            if (emailInstanceSettingsModel.Footer != null &&
                emailInstanceSettingsModel.Footer.Count > 0)
            {
                Footer = emailInstanceSettingsModel.Footer;
            }
        }
Exemple #2
0
        public void MergeWith(EmailSettingsModel customEmailSettingsModel)
        {
            if (customEmailSettingsModel == null)
            {
                return;
            }

            if (customEmailSettingsModel.InvitationEmailSettings != null)
            {
                if (InvitationEmailSettings == null)
                {
                    InvitationEmailSettings = customEmailSettingsModel.InvitationEmailSettings;
                }
                else
                {
                    InvitationEmailSettings.MergeWith(customEmailSettingsModel.InvitationEmailSettings);
                }
            }

            if (customEmailSettingsModel.ConfirmAccountEmailSettings != null)
            {
                if (ConfirmAccountEmailSettings == null)
                {
                    ConfirmAccountEmailSettings = customEmailSettingsModel.ConfirmAccountEmailSettings;
                }
                else
                {
                    ConfirmAccountEmailSettings.MergeWith(customEmailSettingsModel.ConfirmAccountEmailSettings);
                }
            }

            if (customEmailSettingsModel.ForgotPasswordEmailSettings != null)
            {
                if (ForgotPasswordEmailSettings == null)
                {
                    ForgotPasswordEmailSettings = customEmailSettingsModel.ForgotPasswordEmailSettings;
                }
                else
                {
                    ForgotPasswordEmailSettings.MergeWith(customEmailSettingsModel.ForgotPasswordEmailSettings);
                }
            }

            if (customEmailSettingsModel.NewUnreadNotificationsEmailSettings != null)
            {
                if (NewUnreadNotificationsEmailSettings == null)
                {
                    NewUnreadNotificationsEmailSettings = customEmailSettingsModel.NewUnreadNotificationsEmailSettings;
                }
                else
                {
                    NewUnreadNotificationsEmailSettings.MergeWith(customEmailSettingsModel.NewUnreadNotificationsEmailSettings);
                }
            }

            if (customEmailSettingsModel.CollectionInvitationEmailSettings != null)
            {
                if (CollectionInvitationEmailSettings == null)
                {
                    CollectionInvitationEmailSettings = customEmailSettingsModel.CollectionInvitationEmailSettings;
                }
                else
                {
                    CollectionInvitationEmailSettings.MergeWith(customEmailSettingsModel.CollectionInvitationEmailSettings);
                }
            }

            if (customEmailSettingsModel.CollectionInvitationAcceptedEmailSettings != null)
            {
                if (CollectionInvitationAcceptedEmailSettings == null)
                {
                    CollectionInvitationAcceptedEmailSettings = customEmailSettingsModel.CollectionInvitationAcceptedEmailSettings;
                }
                else
                {
                    CollectionInvitationAcceptedEmailSettings.MergeWith(customEmailSettingsModel.CollectionInvitationAcceptedEmailSettings);
                }
            }

            if (customEmailSettingsModel.CollectionInvitationDeclinedEmailSettings != null)
            {
                if (CollectionInvitationDeclinedEmailSettings == null)
                {
                    CollectionInvitationDeclinedEmailSettings = customEmailSettingsModel.CollectionInvitationDeclinedEmailSettings;
                }
                else
                {
                    CollectionInvitationDeclinedEmailSettings.MergeWith(customEmailSettingsModel.CollectionInvitationDeclinedEmailSettings);
                }
            }

            if (customEmailSettingsModel.DownloadAvailableEmailSettings != null)
            {
                if (DownloadAvailableEmailSettings == null)
                {
                    DownloadAvailableEmailSettings = customEmailSettingsModel.DownloadAvailableEmailSettings;
                }
                else
                {
                    DownloadAvailableEmailSettings.MergeWith(customEmailSettingsModel.DownloadAvailableEmailSettings);
                }
            }

            if (customEmailSettingsModel.DownloadFailedEmailSettings != null)
            {
                if (DownloadFailedEmailSettings == null)
                {
                    DownloadFailedEmailSettings = customEmailSettingsModel.DownloadFailedEmailSettings;
                }
                else
                {
                    DownloadFailedEmailSettings.MergeWith(customEmailSettingsModel.DownloadFailedEmailSettings);
                }
            }

            if (customEmailSettingsModel.DownloadDeclinedEmailSettings != null)
            {
                if (DownloadDeclinedEmailSettings == null)
                {
                    DownloadDeclinedEmailSettings = customEmailSettingsModel.DownloadDeclinedEmailSettings;
                }
                else
                {
                    DownloadDeclinedEmailSettings.MergeWith(customEmailSettingsModel.DownloadDeclinedEmailSettings);
                }
            }

            if (customEmailSettingsModel.AccessRequestDoneEmailSettings != null)
            {
                if (AccessRequestDoneEmailSettings == null)
                {
                    AccessRequestDoneEmailSettings = customEmailSettingsModel.AccessRequestDoneEmailSettings;
                }
                else
                {
                    AccessRequestDoneEmailSettings.MergeWith(customEmailSettingsModel.AccessRequestDoneEmailSettings);
                }
            }

            if (customEmailSettingsModel.AccessRequestDeclinedEmailSettings != null)
            {
                if (AccessRequestDeclinedEmailSettings == null)
                {
                    AccessRequestDeclinedEmailSettings = customEmailSettingsModel.AccessRequestDeclinedEmailSettings;
                }
                else
                {
                    AccessRequestDeclinedEmailSettings.MergeWith(customEmailSettingsModel.AccessRequestDeclinedEmailSettings);
                }
            }

            if (customEmailSettingsModel.PermissionRequestDoneEmailSettings != null)
            {
                if (PermissionRequestDoneEmailSettings == null)
                {
                    PermissionRequestDoneEmailSettings = customEmailSettingsModel.PermissionRequestDoneEmailSettings;
                }
                else
                {
                    PermissionRequestDoneEmailSettings.MergeWith(customEmailSettingsModel.PermissionRequestDoneEmailSettings);
                }
            }

            if (customEmailSettingsModel.PermissionRequestDeclinedEmailSettings != null)
            {
                if (PermissionRequestDeclinedEmailSettings == null)
                {
                    PermissionRequestDeclinedEmailSettings = customEmailSettingsModel.PermissionRequestDeclinedEmailSettings;
                }
                else
                {
                    PermissionRequestDeclinedEmailSettings.MergeWith(customEmailSettingsModel.PermissionRequestDeclinedEmailSettings);
                }
            }
        }