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