Table of Contents

Method BindAppSettings

Namespace
Terminal.Gui.Configuration
Assembly
Terminal.Gui.dll

BindAppSettings<T>(string, Action<T>)

Binds a custom application settings section from the configuration to a POCO instance. This is the MEC replacement for the legacy AppSettingsScope.

[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Settings POCOs are simple types preserved by DynamicDependency in ConfigPropertyHostTypes.")]
[UnconditionalSuppressMessage("AOT", "IL3050", Justification = "Settings POCOs are simple types; no generic instantiation needed at runtime.")]
public TuiConfigurationBuilder BindAppSettings<T>(string sectionName, Action<T> apply) where T : new()

Parameters

sectionName string

The JSON section name to bind from.

apply Action<T>

Action to apply the bound settings (typically update a static Defaults property).

Returns

TuiConfigurationBuilder

This builder for chaining.

Type Parameters

T

The settings POCO type.