public PushbulletNotificationChannel([NotNull] IConfiguration configuration, [NotNull] ILogger logger) { _Logger = logger ?? throw new ArgumentNullException(nameof(logger)); _Configuration = configuration["Notifications/Pushbullet"] .Element <PushbulletNotificationChannelConfiguration>() .WithDefault(() => new PushbulletNotificationChannelConfiguration()); }
public EmailNotificationChannel([NotNull] IConfiguration configuration, [NotNull] ILogger logger, [NotNull] ISmtpClientProvider smtpClientProvider) { _Logger = logger ?? throw new ArgumentNullException(nameof(logger)); _SmtpClientProvider = smtpClientProvider ?? throw new ArgumentNullException(nameof(smtpClientProvider)); _Configuration = configuration["Notifications/Email"] .Element <EmailNotificationChannelConfiguration>() .WithDefault(() => new EmailNotificationChannelConfiguration()); }
public WorkQueueProcessorBackgroundService( [NotNull] IBus bus, [NotNull] IWorkQueueRepositoryManager workQueueRepositoryManager, [NotNull] ILogger logger, [NotNull] IContainer container, [NotNull] IConfiguration configuration) { _Bus = bus; _WorkQueueRepositoryManager = workQueueRepositoryManager ?? throw new ArgumentNullException(nameof(workQueueRepositoryManager)); _Logger = logger ?? throw new ArgumentNullException(nameof(logger)); _Container = container ?? throw new ArgumentNullException(nameof(container)); _Configuration = configuration.Element <WorkQueueProcessorConfiguration>("WorkQueues").WithDefault(() => new WorkQueueProcessorConfiguration()); }
public MyBackgroundService([NotNull] ILogger logger, [NotNull] IConfiguration configuration) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } _Logger = logger ?? throw new ArgumentNullException(nameof(logger)); _Configuration = configuration.Element <ConfigurationElement>("Test").WithDefault(new ConfigurationElement()); }
public RegisterSyncfusionComponentLibraries([NotNull] IConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } _Configuration = configuration["Licensing/Syncfusion"] .Element <SyncfusionLicensingConfiguration>() .WithDefault(() => new SyncfusionLicensingConfiguration()); }
public FileWorkQueueRepository([NotNull] IConfiguration configuration, [NotNull] IHasher hasher) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } _Hasher = hasher ?? throw new ArgumentNullException(nameof(hasher)); _Configuration = configuration.Element <FileWorkQueueConfiguration>("WorkQueues/FileBased").WithDefault(() => new FileWorkQueueConfiguration()); }
protected LoggerDestinationBase( [NotNull] ITextLogFormatter textLogFormatter, [NotNull] IConfiguration configuration, [NotNull] string identifier) { if (identifier == null) { throw new ArgumentNullException(nameof(identifier)); } _TextLogFormatter = textLogFormatter ?? throw new ArgumentNullException(nameof(textLogFormatter)); _Options = configuration[$"Logging/Destinations/{identifier}"] .Element <TOptions>() .WithDefault(() => new TOptions()); }
public ConfigurationDataProtectionPasswordProvider([NotNull] IConfiguration configuration) { _Configuration = configuration["DataProtection/Passwords"] .Element <Dictionary <string, string> >() .WithDefault(() => new Dictionary <string, string>()); }
public ConfigurationFeatureTogglesProvider([NotNull] IConfiguration configuration) { _Configuration = configuration.Element <FeatureTogglesConfiguration>("Features") .WithDefault(() => new FeatureTogglesConfiguration()); }
public PluginContainerFinalizer([NotNull] IConfiguration configuration) { _Configuration = configuration["Plugins"].Element <PluginConfiguration>().WithDefault(() => new PluginConfiguration()); }
public WindowsServiceConfiguration([NotNull] IConfiguration configuration) { _Configuration = configuration["WindowsService"] .Element <WindowsServiceConfigurationModel>() .WithDefault(() => new WindowsServiceConfigurationModel()); }