Skip to content

CollectorServiceCollectionExtensions

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework.Collectors

CollectorServiceCollectionExtensions Class

Extension methods for registering IAgentOutputCollectorAccessor<T> in DI.

public static class CollectorServiceCollectionExtensions

Inheritance System.Object 🡒 CollectorServiceCollectionExtensions

Remarks

Generic open types cannot be auto-registered by the framework. Call AddAgentOutputCollector<T>(this IServiceCollection) once per record type at startup.

Methods

CollectorServiceCollectionExtensions.AddAgentOutputCollector<T>(this IServiceCollection) Method

Registers IAgentOutputCollectorAccessor<T> as a singleton for the given record type T.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAgentOutputCollector<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Type parameters

T

The record type the collector accumulates.

Parameters

services Microsoft.Extensions.DependencyInjection.IServiceCollection

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection