ServiceCollectionAgentFrameworkExtensions
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework¶
ServiceCollectionAgentFrameworkExtensions Class¶
Extension methods for Microsoft.Extensions.DependencyInjection.IServiceCollection that register the Needlr Agent Framework infrastructure directly, without requiring the NexusLabs.Needlr.Injection.ConfiguredSyringe fluent builder.
Inheritance System.Object 🡒 ServiceCollectionAgentFrameworkExtensions
Remarks¶
Use this when registering the agent framework from an NexusLabs.Needlr.IServiceCollectionPlugin so that feature projects can self-register without modifying the composition root:
public sealed class AgentFrameworkPlugin : IServiceCollectionPlugin
{
public void Configure(ServiceCollectionPluginOptions options)
{
options.Services.AddNeedlrAgentFramework();
}
}
This calls the same code path as UsingAgentFramework(this ConfiguredSyringe) — zero duplication, zero drift between the two entry points.
Methods¶
ServiceCollectionAgentFrameworkExtensions.AddNeedlrAgentFramework(this IServiceCollection) Method¶
Registers the full Needlr Agent Framework infrastructure on the service collection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddNeedlrAgentFramework(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
Parameters¶
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection to register into.
Returns¶
Microsoft.Extensions.DependencyInjection.IServiceCollection
The same services instance for chaining.