HAKOM.DependencyInjection.Configuration.Net Assembly
HAKOM.DependencyInjection.Configuration.Net
Section titled “HAKOM.DependencyInjection.Configuration.Net”Provides configuration-driven service registration for HAKOM software, allowing external assemblies to register their services with IContainer via configuration entries.
Remarks
Section titled “Remarks”This assembly reads ICustomRegistrationOptions from a configuration source and uses IAssemblyLoader to dynamically load external assemblies at startup. Each configuration entry specifies an assembly path, a class name, and a static registration method that will be invoked with the current IContainer.
The following JSON snippet shows a typical configuration for custom registrations:
{ "DependencyInjection": { "CustomRegistrations": { "CustomRegistration": [ { "Name": "MyModule", "Assembly": "HAKOM.MyModule.Net.dll", "ClassName": "HAKOM.MyModule.Net.Api.Extensions.ContainerExtensions", "RegistrationMethod": "UseMyModule" } ] } }}To apply these registrations, call the UseConfiguredRegistrations extension method on an IContainer instance:
using HAKOM.DependencyInjection.Configuration.Net.Api.Extensions;using HAKOM.DependencyInjection.Core.Net.Api;
var context = IApplicationContext.Create((container) => container.UseConfiguredRegistrations(configuration));| Namespaces | |
|---|---|
| HAKOM.DependencyInjection.Configuration.Net.Api | Contains the public API surface of the configuration-driven dependency injection module. |
| HAKOM.DependencyInjection.Configuration.Net.Api.Exceptions | Contains exceptions thrown when configuration-driven service registration fails. |
| HAKOM.DependencyInjection.Configuration.Net.Api.Extensions | Extension methods for applying configuration-driven service registrations to IContainer instances. |
Was this page helpful?Thanks for your feedback!