コード例 #1
0
 public MemoryCacheIpPolicyStore(
     IMemoryCache cache,
     IRateLimitLoader Loader) : base(cache)
 {
     _options  = Loader.GetIpRateLimitOptions();
     _policies = Loader.GetIpRateLimitPolicies();
 }
コード例 #2
0
 public IpRateLimitProcessor(
     IpRateLimitOptions options,
     IRateLimitCounterStore counterStore,
     IIpPolicyStore policyStore,
     IRateLimitConfiguration config)
     : base(options, counterStore, new IpCounterKeyBuilder(options), config)
 {
     _options     = options;
     _policyStore = policyStore;
 }