Beispiel #1
0
        public UrlRateLimitProcessor(UrlRateLimitOptions options, IRateLimitCounterStore counterStore)
        {
            _options      = options;
            _counterStore = counterStore;

            _core = new RateLimitCore(Processor.UrlRateLimit, options, _counterStore);
        }
        public ClientRateLimitProcessor(ClientRateLimitOptions options,
                                        IRateLimitCounterStore counterStore,
                                        IClientPolicyStore policyStore)
        {
            _options      = options;
            _counterStore = counterStore;
            _policyStore  = policyStore;

            _core = new RateLimitCore(Processor.ClientRateLimit, options, _counterStore);
        }
        public IpRateLimitProcessor(IpRateLimitOptions options,
                                    IRateLimitCounterStore counterStore,
                                    IIpPolicyStore policyStore,
                                    IIpAddressParser ipParser)
        {
            _options      = options;
            _counterStore = counterStore;
            _policyStore  = policyStore;
            _ipParser     = ipParser;

            _core = new RateLimitCore(Processor.IpRateLimit, options, _counterStore);
        }