Method | Description | |
---|---|---|
OnActionExecuting ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void | ||
ThrottlingFilter ( ) : System |
Initializes a new instance of the ThrottlingFilter class. By default, the QuotaExceededResponseCode property is set to 429 (Too Many Requests).
|
|
ThrottlingFilter ( WebApiThrottle.ThrottlePolicy policy, IPolicyRepository policyRepository, IThrottleRepository repository, IThrottleLogger logger, IIpAddressParser ipAddressParser = null ) : System |
Initializes a new instance of the ThrottlingFilter class. Persists the policy object in cache using IPolicyRepository implementation. The policy object can be updated by ThrottleManager at runtime.
|
Method | Description | |
---|---|---|
ComputeThrottleKey ( |
||
GetClientIp ( |
||
QuotaExceededResponse ( |
||
SetIdentity ( |
Method | Description | |
---|---|---|
ApplyThrottling ( System.Web.Http.Controllers.HttpActionContext filterContext, WebApiThrottle.EnableThrottlingAttribute &attr ) : bool |
protected ComputeThrottleKey ( |
||
requestIdentity | ||
period | RateLimitPeriod | |
return | string |
protected GetClientIp ( |
||
request | ||
return |
public OnActionExecuting ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void | ||
actionContext | System.Web.Http.Controllers.HttpActionContext | |
return | void |
protected QuotaExceededResponse ( |
||
request | ||
content | object | |
responseCode | HttpStatusCode | |
retryAfter | string | |
return |
protected SetIdentity ( |
||
request | ||
return |
public ThrottlingFilter ( 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 ip address provider /// |
return | System |