コード例 #1
0
        public static NotificationEntity ToDataModel(this Core.Notification.Notification notification)
        {
            NotificationEntity retVal = new NotificationEntity();

            retVal.InjectFrom(notification);

            retVal.SendingGateway = notification.NotificationSendingGateway.GetType().Name;

            return(retVal);
        }
コード例 #2
0
        public static NotificationEntity ToDataModel(this Core.Notifications.Notification notification)
        {
            var retVal = new NotificationEntity();

            retVal.InjectFrom(notification);

            retVal.SendingGateway = notification.NotificationSendingGateway.GetType().Name;

            if (notification is EmailNotification emailNotification)
            {
                retVal.Сс  = !emailNotification.CC.IsNullOrEmpty() ? string.Join(",", emailNotification.CC) : null;
                retVal.Bcс = !emailNotification.Bcc.IsNullOrEmpty() ? string.Join(",", emailNotification.Bcc) : null;
            }

            return(retVal);
        }