NetModules.Settings.LocalSettings 1.3.8

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetModules.Settings.LocalSettings" Version="1.3.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetModules.Settings.LocalSettings" Version="1.3.8" />
                    
Directory.Packages.props
<PackageReference Include="NetModules.Settings.LocalSettings" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NetModules.Settings.LocalSettings --version 1.3.8
                    
#r "nuget: NetModules.Settings.LocalSettings, 1.3.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NetModules.Settings.LocalSettings@1.3.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NetModules.Settings.LocalSettings&version=1.3.8
                    
Install as a Cake Addin
#tool nuget:?package=NetModules.Settings.LocalSettings&version=1.3.8
                    
Install as a Cake Tool

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:

  1. Fork NetModules.Settings.LocalSettings, make improvements, and submit a pull request.
  2. Code will be reviewed upon submission.
  3. 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!

NetModules Foundation

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.8.4 230 5/16/2025
1.3.8 185 5/8/2025