C# Class WebApiThrottle.ThrottlingMiddleware

Inheritance: Microsoft.Owin.OwinMiddleware
Afficher le fichier Open project: stefanprodan/WebApiThrottle

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
ComputeThrottleKey ( RequestIdentity requestIdentity, RateLimitPeriod period ) : string
SetIdentity ( IOwinRequest request ) : RequestIdentity

Method Details

ComputeThrottleKey() protected méthode

protected ComputeThrottleKey ( RequestIdentity requestIdentity, RateLimitPeriod period ) : string
requestIdentity RequestIdentity
period RateLimitPeriod
Résultat string

Invoke() public méthode

public Invoke ( IOwinContext context ) : System.Threading.Tasks.Task
context IOwinContext
Résultat System.Threading.Tasks.Task

SetIdentity() protected méthode

protected SetIdentity ( IOwinRequest request ) : RequestIdentity
request IOwinRequest
Résultat RequestIdentity

ThrottlingMiddleware() public méthode

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
Résultat Microsoft.Owin

ThrottlingMiddleware() public méthode

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 ///
Résultat Microsoft.Owin