Skip to content
Documentation

ISettings<TSettingsClass,TSettingsInterface> Interface

Defines a strongly-typed settings contract that can be read from an Microsoft.Extensions.Configuration.IConfiguration section.

public interface ISettings<TSettingsClass,TSettingsInterface>
where TSettingsClass : class, TSettingsInterface, HAKOM.Configuration.Core.Net.Api.ISettings<TSettingsClass, TSettingsInterface>
where TSettingsInterface : class

TSettingsClass

The concrete class that implements both TSettingsInterface and this interface. Must be a reference type.

TSettingsInterface

The public interface that consumers depend on for reading settings values. Must be a reference type.

Implementors must provide three static abstract members: Key (the configuration section path), TryRead(IConfiguration) (validation and binding), and Defaults (fallback values when no configuration is present).

ISettings<TSettingsClass,TSettingsInterface>.Defaults Property

Section titled “ISettings<TSettingsClass,TSettingsInterface>.Defaults Property”

Gets the default settings values used when the configuration section identified by Key is not present.

static abstract TSettingsInterface Defaults { get; }

TSettingsInterface

ISettings<TSettingsClass,TSettingsInterface>.Key Property

Section titled “ISettings<TSettingsClass,TSettingsInterface>.Key Property”

Gets the configuration section key used to locate these settings within an Microsoft.Extensions.Configuration.IConfiguration hierarchy.

static abstract string Key { get; }

System.String

ISettings<TSettingsClass,TSettingsInterface>.Value Property

Section titled “ISettings<TSettingsClass,TSettingsInterface>.Value Property”

Gets this instance cast to TSettingsInterface.

TSettingsInterface Value { get; }

TSettingsInterface

ISettings<TSettingsClass,TSettingsInterface>.TryRead(IConfiguration) Method

Section titled “ISettings<TSettingsClass,TSettingsInterface>.TryRead(IConfiguration) Method”

Attempts to read and validate the settings from the given configuration.

static abstract HAKOM.ErrorHandling.Core.Net.Api.Result<TSettingsInterface> TryRead(Microsoft.Extensions.Configuration.IConfiguration configuration);

configuration Microsoft.Extensions.Configuration.IConfiguration

The configuration root or section to bind from.

HAKOM.ErrorHandling.Core.Net.Api.Result<TSettingsInterface>
A Result<TValue> containing the bound TSettingsInterface on success, or an error on failure.

© 2026 Volue.Version v0.6.38017 November 2026