Exemple #1
0
 public void Publish <TNotification>(TNotification notification) where TNotification : INotification
 {
     _backgroundTask.Start(() =>
     {
         var defaultNotificationStrategy = _notificationStrategyFactory.Create <DefaultNotificationStrategy>();
         defaultNotificationStrategy.Publish(notification);
     });
 }
Exemple #2
0
        private void PublishCore <TNotification>(TNotification notification) where TNotification : INotification
        {
            var strategy = _notificationStrategyFactory.Create <FireAndForgetNotificationStrategy>();

            strategy.Publish(notification);
        }