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); }
public NotificationPublisher(INotificationConfiguration notificationConfiguration) { this.NotificationConfiguration = notificationConfiguration; NotificationAgentFactory <T> .CreateAgentInstance(notificationConfiguration); }