/// <summary> /// Initializes <see cref="W3CLoggingMiddleware" />. /// </summary> /// <param name="next"></param> /// <param name="options"></param> /// <param name="w3cLogger"></param> public W3CLoggingMiddleware(RequestDelegate next, IOptionsMonitor <W3CLoggerOptions> options, W3CLogger w3cLogger) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } if (w3cLogger == null) { throw new ArgumentNullException(nameof(w3cLogger)); } _next = next; _options = options; _w3cLogger = w3cLogger; }
/// <summary> /// Initializes <see cref="W3CLoggingMiddleware" />. /// </summary> /// <param name="next"></param> /// <param name="options"></param> /// <param name="w3cLogger"></param> public W3CLoggingMiddleware(RequestDelegate next, IOptionsMonitor <W3CLoggerOptions> options, W3CLogger w3cLogger) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } if (w3cLogger == null) { throw new ArgumentNullException(nameof(w3cLogger)); } _next = next; _options = options; _w3cLogger = w3cLogger; _additionalRequestHeaders = W3CLoggerOptions.FilterRequestHeaders(options.CurrentValue); }