コード例 #1
0
        public async Task <NotificationStatus> Publish <N>(N notification) where N : Concerns.Notification
        {
            try
            {
                var response = await NotificationAgentFactory <T> .SendNotification <N>(notification);

                notification.Status = response.NotificationStatus;
                return(notification.Status);
            }
            catch (Exception e)
            {
            }

            return(NotificationStatus.Failed);
        }
コード例 #2
0
 public NotificationPublisher(INotificationConfiguration notificationConfiguration)
 {
     this.NotificationConfiguration = notificationConfiguration;
     NotificationAgentFactory <T> .CreateAgentInstance(notificationConfiguration);
 }