コード例 #1
0
        public virtual void Patch(NotificationEntity notification)
        {
            notification.IsActive = IsActive;

            if (!Templates.IsNullCollection())
            {
                Templates.Patch(notification.Templates, (sourceTemplate, templateEntity) => sourceTemplate.Patch(templateEntity));
            }
        }
コード例 #2
0
        public override void Patch(NotificationEntity notification)
        {
            var smsNotification = notification as SmsNotificationEntity;

            if (smsNotification != null)
            {
                smsNotification.Number = Number;
            }

            base.Patch(notification);
        }
コード例 #3
0
        public override void Patch(NotificationEntity notification)
        {
            if (notification is EmailNotificationEntity emailNotification)
            {
                emailNotification.From = From;
                emailNotification.To   = To;

                if (!Recipients.IsNullCollection())
                {
                    Recipients.Patch(emailNotification.Recipients, (source, target) => source.Patch(target));
                }

                if (!Attachments.IsNullCollection())
                {
                    Attachments.Patch(emailNotification.Attachments, (source, attachmentEntity) => source.Patch(attachmentEntity));
                }
            }

            base.Patch(notification);
        }