/// <summary> /// Initializes a new instance of the <see cref="WebHookSender"/> class. /// </summary> protected WebHookSender(ILogger <WebHookSender> logger, IOptions <WebHookSettings> settings) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _settings = settings.Value; _serializer = _settings.Settings != null?JsonSerializer.Create(_settings.Settings) : JsonSerializer.CreateDefault(); _serializer.Converters.Add(new NotificationDictionarySerializer()); }
/// <summary> /// Initializes a new instance of the <see cref="WebHookSender"/> class. /// </summary> protected WebHookSender(ILogger <WebHookSender> logger, IOptions <WebHookSettings> settings) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _settings = settings.Value; }