コード例 #1
0
 /// <summary>
 ///     Create new instance.
 /// </summary>
 public NotifyBackgroundTask(INotificationClient notificationClient,
                             INotificationRegistrationRepository notificationRegistrationRepository,
                             ILogger <NotifyBackgroundTask <TData> > logger,
                             IUserRepository userRepository)
 {
     _notificationClient = notificationClient ?? throw new ArgumentNullException(nameof(notificationClient));
     _notificationRegistrationRepository = notificationRegistrationRepository ?? throw new ArgumentNullException(nameof(notificationRegistrationRepository));
     _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
     _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
 }
コード例 #2
0
 /// <summary>
 ///     Create new instance.
 /// </summary>
 public NotificationService(INotificationClient notificationClient,
                            INotificationRegistrationRepository notificationRegistrationRepository,
                            DispatchManager dispatchManager,
                            IUserRepository userRepository,
                            INotificationFactory notificationFactory,
                            ILogger <NotificationService> logger)
 {
     _notificationClient = notificationClient ?? throw new ArgumentNullException(nameof(notificationClient));
     _notificationRegistrationRepository = notificationRegistrationRepository ?? throw new ArgumentNullException(nameof(notificationRegistrationRepository));
     _dispatchManager     = dispatchManager ?? throw new ArgumentNullException(nameof(dispatchManager));
     _userRepository      = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     _notificationFactory = notificationFactory ?? throw new ArgumentNullException(nameof(notificationFactory));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }