Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting Method
Definition
- Namespace:
- Microsoft.AspNetCore.Builder
- Assembly:
- Microsoft.AspNetCore.RateLimiting.dll
- Package:
- Microsoft.AspNetCore.App.Ref v10.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.RateLimiting v7.0.0-rc.2.22476.2
- Package:
- Microsoft.AspNetCore.App.Ref v8.0.19
- Package:
- Microsoft.AspNetCore.App.Ref v9.0.8
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>) |
Adds the specified rate limiting policy to the endpoint(s). |
| RequireRateLimiting<TBuilder>(TBuilder, String) |
Adds the specified rate limiting policy to the endpoint(s). |
RequireRateLimiting<TBuilder,TPartitionKey>(TBuilder, IRateLimiterPolicy<TPartitionKey>)
Adds the specified rate limiting policy to the endpoint(s).
public static TBuilder RequireRateLimiting<TBuilder,TPartitionKey>(this TBuilder builder, Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy<TPartitionKey> policy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireRateLimiting : 'Builder * Microsoft.AspNetCore.RateLimiting.IRateLimiterPolicy<'PartitionKey> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireRateLimiting(Of TBuilder As IEndpointConventionBuilder, TPartitionKey As IEndpointConventionBuilder) (builder As TBuilder, policy As IRateLimiterPolicy(Of TPartitionKey)) As TBuilder
Type Parameters
- TBuilder
- TPartitionKey
Parameters
- builder
- TBuilder
The endpoint convention builder.
The rate limiting policy to add to the endpoint.
Returns
The original convention builder parameter.
Applies to
RequireRateLimiting<TBuilder>(TBuilder, String)
Adds the specified rate limiting policy to the endpoint(s).
public static TBuilder RequireRateLimiting<TBuilder>(this TBuilder builder, string policyName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireRateLimiting : 'Builder * string -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireRateLimiting(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, policyName As String) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
The endpoint convention builder.
- policyName
- String
The name of the rate limiting policy to add to the endpoint.
Returns
The original convention builder parameter.
Applies to
Feedback
Was this page helpful?
