Ejemplo n.º 1
0
        public ThrottlingFilter(
            ThrottlePolicy policy,
            IPolicyRepository policyRepo     = null,
            IThrottleRepository throttleRepo = null)
        {
            var ipAddressParser = new ApiIpAddressParser();

            processer = new ThrottleProcesser(policy, ipAddressParser, policyRepo, throttleRepo);
        }
Ejemplo n.º 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);
        }