9 instantiations of LeaseContext
Microsoft.AspNetCore.RateLimiting (9)
RateLimitingMiddleware.cs (9)
191
return new
LeaseContext
() { RequestRejectionReason = RequestRejectionReason.GlobalLimiter, Lease = globalLease };
198
return new
LeaseContext
() { RequestRejectionReason = RequestRejectionReason.EndpointLimiter, Lease = endpointLease };
207
return globalLease is null ? new
LeaseContext
() { Lease = endpointLease } : new
LeaseContext
() { Lease = new DefaultCombinedLease(globalLease, endpointLease) };
222
return new
LeaseContext
() { RequestRejectionReason = RequestRejectionReason.GlobalLimiter, Lease = globalLease };
229
return new
LeaseContext
() { RequestRejectionReason = RequestRejectionReason.EndpointLimiter, Lease = endpointLease };
240
return new
LeaseContext
() { RequestRejectionReason = RequestRejectionReason.RequestCanceled };
248
return globalLease is null ? new
LeaseContext
() { Lease = endpointLease } : new
LeaseContext
() { Lease = new DefaultCombinedLease(globalLease, endpointLease) };
5 references to LeaseContext
Microsoft.AspNetCore.RateLimiting (5)
RateLimitingMiddleware.cs (5)
93
using
var
leaseContext = await TryAcquireAsync(context, metricsContext);
151
private async ValueTask<
LeaseContext
> TryAcquireAsync(HttpContext context, MetricsContext metricsContext)
153
var
leaseContext = CombinedAcquire(context);
179
private
LeaseContext
CombinedAcquire(HttpContext context)
210
private async ValueTask<
LeaseContext
> CombinedWaitAsync(HttpContext context, CancellationToken cancellationToken)