2 types derived from ResourceCounter
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\ResourceCounter.cs (2)
16private sealed class UnlimitedCounter : ResourceCounter 24internal sealed class FiniteCounter : ResourceCounter
14 references to ResourceCounter
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Internal\Infrastructure\ConnectionManager.cs (5)
22public ConnectionManager(KestrelTrace trace, ResourceCounter upgradedConnections) 34public ResourceCounter UpgradedConnectionCount { get; } 89private static ResourceCounter GetCounter(long? number) 91? ResourceCounter.Quota(number.Value) 92: ResourceCounter.Unlimited;
Internal\Infrastructure\ResourceCounter.cs (2)
13public static ResourceCounter Unlimited { get; } = new UnlimitedCounter(); 14public static ResourceCounter Quota(long amount) => new FiniteCounter(amount);
Middleware\ConnectionLimitMiddleware.cs (5)
14private readonly ResourceCounter _concurrentConnectionCounter; 19: this(next, ResourceCounter.Quota(connectionLimit), trace, metrics) 24internal ConnectionLimitMiddleware(Func<T, Task> next, ResourceCounter concurrentConnectionCounter, KestrelTrace trace, KestrelMetrics metrics) 58private readonly ResourceCounter _concurrentConnectionCounter; 61public ConnectionReleasor(ResourceCounter normalConnectionCounter)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
ResourceCounterTests.cs (2)
24var counter = ResourceCounter.Quota(1); 36var counter = ResourceCounter.Quota(max);