5 writes to RequestRejectionReason
Microsoft.AspNetCore.RateLimiting (5)
RateLimitingMiddleware.cs (5)
191return new LeaseContext() { RequestRejectionReason = RequestRejectionReason.GlobalLimiter, Lease = globalLease }; 198return new LeaseContext() { RequestRejectionReason = RequestRejectionReason.EndpointLimiter, Lease = endpointLease }; 222return new LeaseContext() { RequestRejectionReason = RequestRejectionReason.GlobalLimiter, Lease = globalLease }; 229return new LeaseContext() { RequestRejectionReason = RequestRejectionReason.EndpointLimiter, Lease = endpointLease }; 240return new LeaseContext() { RequestRejectionReason = RequestRejectionReason.RequestCanceled };
4 references to RequestRejectionReason
Microsoft.AspNetCore.RateLimiting (4)
RateLimitingMiddleware.cs (4)
112_metrics.LeaseFailed(metricsContext, leaseContext.RequestRejectionReason!.Value); 115if (leaseContext.RequestRejectionReason == RequestRejectionReason.RequestCanceled) 126if (leaseContext.RequestRejectionReason == RequestRejectionReason.EndpointLimiter) 175_metrics.QueueEnd(metricsContext, leaseContext.RequestRejectionReason, startTimestamp, Stopwatch.GetTimestamp());