Méthode | Description | |
---|---|---|
ThrottlingHandler ( ) : System |
Initializes a new instance of the ThrottlingHandler class. By default, the QuotaExceededResponseCode property is set to 429 (Too Many Requests).
|
|
ThrottlingHandler ( WebApiThrottle.ThrottlePolicy policy, IPolicyRepository policyRepository, IThrottleRepository repository, IThrottleLogger logger, IIpAddressParser ipAddressParser = null ) : System |
Initializes a new instance of the ThrottlingHandler class. Persists the policy object in cache using IPolicyRepository implementation. The policy object can be updated by ThrottleManager at runtime.
|
Méthode | Description | |
---|---|---|
ComputeThrottleKey ( |
||
GetClientIp ( |
||
QuotaExceededResponse ( |
||
SendAsync ( |
||
SetIdentity ( |
protected ComputeThrottleKey ( |
||
requestIdentity | ||
period | RateLimitPeriod | |
Résultat | string |
protected GetClientIp ( |
||
request | ||
Résultat |
protected QuotaExceededResponse ( |
||
request | ||
content | object | |
responseCode | HttpStatusCode | |
retryAfter | string | |
Résultat | Task |
protected SendAsync ( |
||
request | ||
cancellationToken | ||
Résultat | Task |
protected SetIdentity ( |
||
request | ||
Résultat |
public ThrottlingHandler ( WebApiThrottle.ThrottlePolicy policy, IPolicyRepository policyRepository, IThrottleRepository repository, IThrottleLogger logger, IIpAddressParser ipAddressParser = null ) : System | ||
policy | WebApiThrottle.ThrottlePolicy | /// The policy. /// |
policyRepository | IPolicyRepository | /// The policy repository. /// |
repository | IThrottleRepository | /// The repository. /// |
logger | IThrottleLogger | /// The logger. /// |
ipAddressParser | IIpAddressParser | /// The IpAddressParser /// |
Résultat | System |