Namespace Savvyio.Extensions.DependencyInjection
At host startup, AddSavvyIO creates the registration graph that ties together handlers, dispatchers, marshallers, data sources, and the service locator — all in one fluent call. Use this namespace in every Savvy I/O application that runs under Microsoft's DI container.
AddHandlerServicesDescriptor enables handler auto-discovery; AddDataSource<TService> registers your data access layer; AddMarshaller<TService> sets the serialization strategy; AddServiceLocator exposes IServiceLocator. After startup, call IServiceProvider.WriteHandlerDiscoveriesToLog<TCategoryName> to audit which handlers were resolved. Start with AddSavvyIO and compose the sub-namespaces — Savvyio.Extensions.DependencyInjection.EFCore, Savvyio.Extensions.DependencyInjection.NATS, and their siblings — to add broker and persistence-specific registrations.
Availability: .NET 10 and .NET 9
Extension Members
| Type | Ext | Methods |
|---|---|---|
| IServiceCollection | ⬇️ | AddSavvyIO, AddConfiguredOptions<TOptions>, AddMarshaller<TService>, AddDataSource<TService>, AddServiceLocator, AddHandlerServicesDescriptor |
| IServiceProvider | ⬇️ | WriteHandlerDiscoveriesToLog<TCategoryName> |
Classes
SavvyioDependencyInjectionOptions
Specifies options that is related to setting up Savvy I/O services.
ServiceCollectionExtensions
Extension methods for the IServiceCollection interface.
ServiceLocatorOptions
Configuration options for IServiceLocator.
ServiceProviderExtensions
Extension methods for the IServiceProvider interface.
Interfaces
IDataSource<TMarker>
Defines a generic way to support multiple implementations that does the actual I/O communication with a source of data.