Skip to content
Documentation

Service<TSettingsClass,TSettingsInterface> Class

Base class for HAKOM HTTP services that require strongly-typed settings bound from configuration.

public abstract class Service<TSettingsClass,TSettingsInterface> : HAKOM.Http.Core.Net.Api.Service, System.IAsyncDisposable
where TSettingsClass : class, TSettingsInterface, HAKOM.Configuration.Core.Net.Api.ISettings<TSettingsClass, TSettingsInterface>
where TSettingsInterface : class

TSettingsClass

The concrete settings class that implements TSettingsInterface and ISettings<TSettingsClass,TSettingsInterface>.

TSettingsInterface

The settings interface exposed to the service implementation.

Inheritance System.Object 🡒 Service 🡒 Service<TSettingsClass,TSettingsInterface>

Implements System.IAsyncDisposable

Initializes a new instance of Service<TSettingsClass,TSettingsInterface>.

protected Service();

Service<TSettingsClass,TSettingsInterface>.Settings Property

Section titled “Service<TSettingsClass,TSettingsInterface>.Settings Property”

Gets the strongly-typed settings bound from configuration. Available after Setup(string[]) has been called.

protected TSettingsInterface Settings { protected get; }

TSettingsInterface

Service<TSettingsClass,TSettingsInterface>.ConfigureHakomServices(IContainer, IConfiguration) Method

Section titled “Service<TSettingsClass,TSettingsInterface>.ConfigureHakomServices(IContainer, IConfiguration) Method”

Registers HAKOM services and resolves hosting configuration from the DI container.

protected override void ConfigureHakomServices(HAKOM.DependencyInjection.Core.Net.Api.IContainer container, out Microsoft.Extensions.Configuration.IConfiguration? hostConfiguration);

container IContainer

The DI container to register services into.

hostConfiguration Microsoft.Extensions.Configuration.IConfiguration

When this method returns, contains the resolved Microsoft.Extensions.Configuration.IConfiguration for the hosting section, or null if no host configuration was found.

Override this method in derived classes to register additional services. Always call base.ConfigureHakomServices.

© 2026 Volue.Version v0.6.38017 November 2026