8 writes to Lease
Microsoft.AspNetCore.RateLimiting (8)
RateLimitingMiddleware.cs (8)
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 }; 248return globalLease is null ? new LeaseContext() { Lease = endpointLease } : new LeaseContext() { Lease = new DefaultCombinedLease(globalLease, endpointLease) };
4 references to Lease
Microsoft.AspNetCore.RateLimiting (4)
LeaseContext.cs (1)
16Lease?.Dispose();
RateLimitingMiddleware.cs (3)
95if (leaseContext.Lease?.IsAcquired == true) 146await thisRequestOnRejected(new OnRejectedContext() { HttpContext = context, Lease = leaseContext.Lease! }, context.RequestAborted); 154if (leaseContext.Lease?.IsAcquired == true)