Ejemplo n.º 1
0
        public CertificateRenewalService(
            CertificateSelector certificateSelector,
            IOptionsMonitor <LetsEncryptOptions> letsEncryptOptions,
            ICertificateStore certificateStore,
            ILetsEncryptService letsEncryptService,
            IOptionsMonitor <TimedHostedServiceOptions> options,
            IEnumerable <ITimedHostedLifeCycleHook> lifeCycleHooks,
            ILogger <ITimedHostedService> logger) : base(options, lifeCycleHooks, logger)
        {
            _certificateSelector = certificateSelector ?? throw new System.ArgumentNullException(nameof(certificateSelector));

            _options = letsEncryptOptions.CurrentValue;
            letsEncryptOptions.OnChange(newOptions => _options = newOptions);

            _letsEncryptService = letsEncryptService ?? throw new System.ArgumentNullException(nameof(letsEncryptService));
            _logger             = logger ?? throw new System.ArgumentNullException(nameof(logger));
            _certificateStore   = certificateStore ?? throw new System.ArgumentNullException(nameof(certificateStore));

            TaskToExecuteAsync = (token) => RequestCertificate(token);
        }
Ejemplo n.º 2
0
 public KestrelOptionsSetup(CertificateSelector certificateSelector)
 {
     _certificateSelector = certificateSelector ?? throw new ArgumentNullException(nameof(certificateSelector));
 }