Uniform.Matrix.Hosting
0.1.2
dotnet add package Uniform.Matrix.Hosting --version 0.1.2
NuGet\Install-Package Uniform.Matrix.Hosting -Version 0.1.2
<PackageReference Include="Uniform.Matrix.Hosting" Version="0.1.2" />
<PackageVersion Include="Uniform.Matrix.Hosting" Version="0.1.2" />
<PackageReference Include="Uniform.Matrix.Hosting" />
paket add Uniform.Matrix.Hosting --version 0.1.2
#r "nuget: Uniform.Matrix.Hosting, 0.1.2"
#:package Uniform.Matrix.Hosting@0.1.2
#addin nuget:?package=Uniform.Matrix.Hosting&version=0.1.2
#tool nuget:?package=Uniform.Matrix.Hosting&version=0.1.2
Uniform.Matrix.Hosting
Settings and logging for applications on the .NET generic host: a user settings file between appsettings.json and the command line, a catalog of every option with its description, an editor that applies or saves changes, and one log file per session.
dotnet add package Uniform.Matrix.Hosting
Set up
using Microsoft.Extensions.Hosting;
using Uniform.Matrix.Hosting;
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
builder.AddSettings();
builder.Services.AddOptionSection<PlayerOptions>(builder.Configuration, PlayerOptions.Section);
builder.AddSessionLogging(Path.Combine(AppDirectories.Data(builder.Environment.ApplicationName), "logs"), keep: 20);
Options are plain records; their XML doc comments become the descriptions in the catalog.
/// <summary>Playback settings, configuration section <see cref="Section"/>.</summary>
public sealed record PlayerOptions
{
public const string Section = "Player";
/// <summary>Volume from 0 to 10.</summary>
public int Volume { get; set; } = 5;
/// <summary>Output device; read at start only.</summary>
[RestartRequired]
public string? Device { get; set; }
/// <summary>Account password; never shown or saved.</summary>
[Secret]
public string? Password { get; set; }
}
What you get
- Configuration layers, lowest first:
appsettings.json, the settings file~/.config/<app>/settings.json(under$XDG_CONFIG_HOME), environment variables, the command line, then changes applied at run time. Options read throughIOptionsMonitorsee applied changes. OptionCataloglists every registered option with its type, default, current value, source and description;SettingsEditoredits them and applies, saves, resets, loads and exports.AppDirectoriesgives XDG data and config folders named after the application, e.g.~/.local/share/my-app.- Session logs keep the newest files and remove older ones at start;
FileLoggerProvider.FilePathis the current one.
For a terminal UI over these, see Uniform.Matrix.Gui.Terminal.
About
Part of Uniform.Matrix, a pure .NET implementation of the Matrix specification. Version 0.1 is an early pre-release: APIs may still change.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Hosting (>= 10.0.12)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Uniform.Matrix.Hosting:
| Package | Downloads |
|---|---|
|
Uniform.Matrix.Client
Matrix client engine with local SQLite storage: session, sync, outbox, media cache, encryption and room state. |
|
|
Uniform.Matrix.Server
Matrix homeserver engine on ASP.NET Core and SQLite: accounts, rooms, sync, media, the end-to-end encryption relay and the room directory. Add it with AddMatrixServer and MapMatrixServer. |
|
|
Uniform.Matrix.Gui.Terminal
Terminal.Gui components for host applications: settings window, log window and dialogs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.2 | 0 | 10/27/2026 |
| 0.1.0 | 0 | 10/26/2026 |
| 0.1.0-alpha.1 | 0 | 10/26/2026 |