C# 클래스 WebApiThrottle.ThrottlingMiddleware

상속: Microsoft.Owin.OwinMiddleware
파일 보기 프로젝트 열기: stefanprodan/WebApiThrottle

공개 메소드들

메소드 설명
Invoke ( IOwinContext context ) : System.Threading.Tasks.Task
ThrottlingMiddleware ( Microsoft.Owin.OwinMiddleware next ) : Microsoft.Owin

Initializes a new instance of the ThrottlingMiddleware class. By default, the QuotaExceededResponseCode property is set to 429 (Too Many Requests).

ThrottlingMiddleware ( Microsoft.Owin.OwinMiddleware next, WebApiThrottle.ThrottlePolicy policy, IPolicyRepository policyRepository, IThrottleRepository repository, IThrottleLogger logger, IIpAddressParser ipAddressParser ) : Microsoft.Owin

Initializes a new instance of the ThrottlingMiddleware class. Persists the policy object in cache using IPolicyRepository implementation. The policy object can be updated by ThrottleManager at runtime.

보호된 메소드들

메소드 설명
ComputeThrottleKey ( RequestIdentity requestIdentity, RateLimitPeriod period ) : string
SetIdentity ( IOwinRequest request ) : RequestIdentity

메소드 상세

ComputeThrottleKey() 보호된 메소드

protected ComputeThrottleKey ( RequestIdentity requestIdentity, RateLimitPeriod period ) : string
requestIdentity RequestIdentity
period RateLimitPeriod
리턴 string

Invoke() 공개 메소드

public Invoke ( IOwinContext context ) : System.Threading.Tasks.Task
context IOwinContext
리턴 System.Threading.Tasks.Task

SetIdentity() 보호된 메소드

protected SetIdentity ( IOwinRequest request ) : RequestIdentity
request IOwinRequest
리턴 RequestIdentity

ThrottlingMiddleware() 공개 메소드

Initializes a new instance of the ThrottlingMiddleware class. By default, the QuotaExceededResponseCode property is set to 429 (Too Many Requests).
public ThrottlingMiddleware ( Microsoft.Owin.OwinMiddleware next ) : Microsoft.Owin
next Microsoft.Owin.OwinMiddleware
리턴 Microsoft.Owin

ThrottlingMiddleware() 공개 메소드

Initializes a new instance of the ThrottlingMiddleware class. Persists the policy object in cache using IPolicyRepository implementation. The policy object can be updated by ThrottleManager at runtime.
public ThrottlingMiddleware ( Microsoft.Owin.OwinMiddleware next, WebApiThrottle.ThrottlePolicy policy, IPolicyRepository policyRepository, IThrottleRepository repository, IThrottleLogger logger, IIpAddressParser ipAddressParser ) : Microsoft.Owin
next Microsoft.Owin.OwinMiddleware
policy WebApiThrottle.ThrottlePolicy /// The policy. ///
policyRepository IPolicyRepository /// The policy repository. ///
repository IThrottleRepository /// The repository. ///
logger IThrottleLogger /// The logger. ///
ipAddressParser IIpAddressParser /// The IpAddressParser ///
리턴 Microsoft.Owin