< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Providers.AlwaysGrantQuotaGate
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Providers/AlwaysGrantQuotaGate.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 16
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
TryReserveAsync(...)100%11100%
ReleaseAsync(...)100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Providers/AlwaysGrantQuotaGate.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework.Providers;
 2
 3/// <summary>
 4/// <see cref="IQuotaGate"/> that always grants reservations. Suitable for development
 5/// and scenarios where quota tracking is not needed.
 6/// </summary>
 7public sealed class AlwaysGrantQuotaGate : IQuotaGate
 8{
 9    /// <inheritdoc />
 10    public Task<bool> TryReserveAsync(string providerName, string? quotaPartition, CancellationToken cancellationToken) 
 811        Task.FromResult(true);
 12
 13    /// <inheritdoc />
 14    public Task ReleaseAsync(string providerName, string? quotaPartition, bool succeeded, CancellationToken cancellation
 815        Task.CompletedTask;
 16}