Exemplo n.º 1
0
        public UrlRateLimitProcessor(UrlRateLimitOptions options, IRateLimitCounterStore counterStore)
        {
            _options      = options;
            _counterStore = counterStore;

            _core = new RateLimitCore(Processor.UrlRateLimit, options, _counterStore);
        }
Exemplo n.º 2
0
        public UrlRateLimitMiddleware(RequestDelegate next,
                                      IOptions <UrlRateLimitOptions> options,
                                      IRateLimitCounterStore counterStore,
                                      ILogger <UrlRateLimitMiddleware> logger
                                      )
        {
            _next    = next;
            _options = options.Value;
            _logger  = logger;

            _processor = new UrlRateLimitProcessor(_options, counterStore);
        }