public ClientRateLimitProcessor(ClientRateLimitOptions options,
                                        IRateLimitCounterStore counterStore,
                                        IClientPolicyStore policyStore)
        {
            _options      = options;
            _counterStore = counterStore;
            _policyStore  = policyStore;

            _core = new RateLimitCore(Processor.ClientRateLimit, options, _counterStore);
        }
Ejemplo n.º 2
0
        public ClientRateLimitMiddleware(RequestDelegate next,
                                         IOptions <ClientRateLimitOptions> options,
                                         IRateLimitCounterStore counterStore,
                                         IClientPolicyStore policyStore,
                                         ILogger <ClientRateLimitMiddleware> logger
                                         )
        {
            _next    = next;
            _options = options.Value;
            _logger  = logger;

            _processor = new ClientRateLimitProcessor(_options, counterStore, policyStore);
        }