NetModules.Settings.LocalSettings
1.3.8
See the version list below for details.
dotnet add package NetModules.Settings.LocalSettings --version 1.3.8
NuGet\Install-Package NetModules.Settings.LocalSettings -Version 1.3.8
<PackageReference Include="NetModules.Settings.LocalSettings" Version="1.3.8" />
<PackageVersion Include="NetModules.Settings.LocalSettings" Version="1.3.8" />
<PackageReference Include="NetModules.Settings.LocalSettings" />
paket add NetModules.Settings.LocalSettings --version 1.3.8
#r "nuget: NetModules.Settings.LocalSettings, 1.3.8"
#:package NetModules.Settings.LocalSettings@1.3.8
#addin nuget:?package=NetModules.Settings.LocalSettings&version=1.3.8
#tool nuget:?package=NetModules.Settings.LocalSettings&version=1.3.8
NetModules.Settings.LocalSettings
NetModules.Settings.LocalSettings is a basic settings module that is built using the NetModules architecture.
It is designed to load and return configuration settings for other modules from a local file if a NetModules module raises a GetSettingEvent or uses its GetSetting(settingName, defaultValue) wrapper method. The settings are stored in a JSON file and loaded using NetTools.Serialization.Json. NetTools.Serialization.Json allows line comments in JSON so you can add descriptions and documentation, while JSON makes configuration files easy to read and modify.
When added to your project, this module is set to AutoLoad and LoadFirst, with a high LoadPriority and a lowest HandlePriority.
This means that the module should be ready to serve required settings to other modules while they are loading, and if another settings provider module is loaded with a higher HandlePriority, it will override the settings provided by this module. This allows for a flexible and extensible settings architecture, where multiple modules can provide settings, and the most appropriate one will be used based on priority.
Features
- Local Settings: Store module settings in local JSON files.
- Event-Driven: Uses events to retrieve settings, allowing for dynamic configuration.
- Easy Integration: Simple to integrate with existing modules.
Getting Started
Installation
To use MetModules.Settings.LocalSettings, add the library to your module hosting project via NuGet Package Manager:
Install-Package NetModules.Settings.LocalSettings
When you load modules using ModuleHost.Modules.LoadModules();, NetModules.Settings.LocalSettings will be loaded and ready to serve settings to other modules.
Quick Examples
Adding a Local Settings File
using System;
using NetTools.Logging;
// This is an incredibly simple implementation of the ILogger interface.
public class ConsoleLogger : ILogger
{
public void Error(params object[] args) => Console.WriteLine($"[ERROR] {string.Join(" ", args)}");
public void Analytic(params object[] args) => Console.WriteLine($"[ANALYTIC] {string.Join(" ", args)}");
public void Information(params object[] args) => Console.WriteLine($"[INFO] {string.Join(" ", args)}");
public void Debug(params object[] args) => Console.WriteLine($"[DEBUG] {string.Join(" ", args)}");
}
Contributing
We welcome contributions! To get involved:
- Fork NetModules.Settings.LocalSettings, make improvements, and submit a pull request.
- Code will be reviewed upon submission.
- Join discussions via the issues board.
License
NetModules.Settings.LocalSettings is licensed under the MIT License, allowing unrestricted use, modification, and distribution. If you use NetModules.Settings.LocalSettings in your own project, we’d love to hear about your experience, and possibly feature you on our website!
Full documentation coming soon!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net6.0
- NetModules (>= 1.3.8)
- NetTools.Serialization.Json (>= 1.1.39)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.