public TestCertificateValidatingMailService(MailServiceOptions options, ILogger <CertificateValidatingMailService> logger, MailServerCertificateValidationOptions certificateOptions, IMailTransportFactory mailClientFactory) : base(options, logger, certificateOptions, mailClientFactory) { }
/// <summary>Initializes a new instance of the <see cref="CertificateValidatingMailService" /> class.</summary> /// <param name="options">The options.</param> /// <param name="logger">The logger to use.</param> /// <param name="certificateOptions">The certificateOptions.</param> /// <param name="mailClientFactory">The mailClientFactory.</param> /// <exception cref="ArgumentNullException">certificateOptions, options</exception> public CertificateValidatingMailService(MailServiceOptions options, ILogger <CertificateValidatingMailService> logger, MailServerCertificateValidationOptions certificateOptions, IMailTransportFactory mailClientFactory) : base(options, logger) { MailClientFactory = mailClientFactory ?? throw new ArgumentNullException(nameof(mailClientFactory)); _certificateOptions = certificateOptions ?? throw new ArgumentNullException(nameof(certificateOptions)); CertificateValidationCallback = ValidateCertificate; }
/// <summary> /// <para></para> /// <para>Initializes a new instance of the <see cref="CertificateValidatingMailService" /> class.</para> /// </summary> /// <param name="optionsMonitor">The optionsMonitor.</param> /// <param name="logger">The logger to use.</param> /// <param name="certificateOptionsMonitor">The certificateOptionsMonitor</param> /// <param name="mailClientFactory">The mailClientFactory.</param> /// <exception cref="ArgumentNullException">certificateOptions, options</exception> public CertificateValidatingMailService(IOptionsMonitor <MailServiceOptions> optionsMonitor, ILogger <CertificateValidatingMailService> logger, IOptionsMonitor <MailServerCertificateValidationOptions> certificateOptionsMonitor, IMailTransportFactory mailClientFactory) : base(optionsMonitor, logger) { MailClientFactory = mailClientFactory ?? throw new ArgumentNullException(nameof(mailClientFactory)); CertificateOptionsMonitor = certificateOptionsMonitor ?? throw new ArgumentNullException(nameof(certificateOptionsMonitor)); CertificateValidationCallback = ValidateCertificate; }