示例#1
0
        public ThrottlingFilter(
            ThrottlePolicy policy,
            IPolicyRepository policyRepo     = null,
            IThrottleRepository throttleRepo = null)
        {
            var ipAddressParser = new ApiIpAddressParser();

            processer = new ThrottleProcesser(policy, ipAddressParser, policyRepo, throttleRepo);
        }
示例#2
0
        public ThrottlingMiddleware(
            OwinMiddleware next,
            ThrottlePolicy policy,
            IPolicyRepository policyRepo     = null,
            IThrottleRepository throttleRepo = null)
            : base(next)
        {
            var ipAddressParser = new ApiIpAddressParser();

            processer = new ThrottleProcesser(policy, ipAddressParser, policyRepo, throttleRepo);
        }