< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Collectors.AgentOutputCollector<T>
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Collectors/AgentOutputCollector.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 22
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
.ctor()100%11100%
Add(...)100%11100%
get_Items()100%11100%
get_Count()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Collectors/AgentOutputCollector.cs

#LineLine coverage
 1using System.Collections.Concurrent;
 2
 3namespace NexusLabs.Needlr.AgentFramework.Collectors;
 4
 5/// <summary>
 6/// Default thread-safe implementation of <see cref="IAgentOutputCollector{T}"/>
 7/// backed by a <see cref="ConcurrentQueue{T}"/>.
 8/// </summary>
 9[DoNotAutoRegister]
 10public sealed class AgentOutputCollector<T> : IAgentOutputCollector<T>
 11{
 1112    private readonly ConcurrentQueue<T> _items = new();
 13
 14    /// <inheritdoc />
 10815    public void Add(T item) => _items.Enqueue(item);
 16
 17    /// <inheritdoc />
 518    public IReadOnlyList<T> Items => _items.ToArray();
 19
 20    /// <inheritdoc />
 521    public int Count => _items.Count;
 22}

Methods/Properties

.ctor()
Add(T)
get_Items()
get_Count()