16 references to RequestRejectionReason
Microsoft.AspNetCore.RateLimiting (16)
LeaseContext.cs (1)
10public RequestRejectionReason? RequestRejectionReason { get; init; }
RateLimitingMetrics.cs (8)
54public void LeaseFailed(in MetricsContext metricsContext, RequestRejectionReason reason) 63private void LeaseFailedCore(in MetricsContext metricsContext, RequestRejectionReason reason) 136public void QueueEnd(in MetricsContext metricsContext, RequestRejectionReason? reason, long startTimestamp, long currentTimestamp) 145private void QueueEndCore(in MetricsContext metricsContext, RequestRejectionReason? reason, long startTimestamp, long currentTimestamp) 176private static string GetResult(RequestRejectionReason reason) 180RequestRejectionReason.EndpointLimiter => "endpoint_limiter", 181RequestRejectionReason.GlobalLimiter => "global_limiter", 182RequestRejectionReason.RequestCanceled => "request_canceled",
RateLimitingMiddleware.cs (7)
115if (leaseContext.RequestRejectionReason == RequestRejectionReason.RequestCanceled) 126if (leaseContext.RequestRejectionReason == RequestRejectionReason.EndpointLimiter) 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 };