public ApiKeyMiddleware(RequestDelegate next, string apiKeyName, string apiKey, IEnumerable <string> bypassPaths) { next.VerifyNotNull(nameof(next)); apiKeyName.VerifyNotNull(nameof(apiKeyName)); apiKey.VerifyNotNull(nameof(apiKey)); bypassPaths.VerifyNotNull(nameof(bypassPaths)); _next = next; _apiKeyName = apiKeyName; _apiKey = apiKey; _bypassPaths = bypassPaths.ToList(); }