MConfiguration 1.0.1
dotnet add package MConfiguration --version 1.0.1
NuGet\Install-Package MConfiguration -Version 1.0.1
        
        
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="MConfiguration" Version="1.0.1" />
        
        
For projects that support PackageReference, copy this XML node into the project file to reference the package.
                    
    
    <PackageVersion Include="MConfiguration" Version="1.0.1" />
<PackageReference Include="MConfiguration" />
        
        
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 MConfiguration --version 1.0.1
        
        
 The NuGet Team does not provide support for this client. Please contact its maintainers for support.
                    
    
    #r "nuget: MConfiguration, 1.0.1"
        
        
#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 MConfiguration@1.0.1
        
        
#: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=MConfiguration&version=1.0.1
#tool nuget:?package=MConfiguration&version=1.0.1
        
        
 The NuGet Team does not provide support for this client. Please contact its maintainers for support.
                    
    
    MConfiguration 🛠️
The MConfiguration library provides functionality for reading and updating configuration settings stored in a JSON file.
Usage 🚀
Instantiate the
MConfiguration.var configManager = new ConfigManager();Retrieve a configuration value by its key.
string? value = configManager.Get("key");Set a configuration value.
configManager.Set("key", "value");
Methods 🔧
Get
public string? Get(string key)
Retrieves the value associated with the specified key from the configuration.
Parameters
key: The key of the configuration value to retrieve.
Returns
- A string representing the value associated with the specified key. Returns 
nullif the key is not found or the value is empty. 
- A string representing the value associated with the specified key. Returns 
 
Set
public void Set(string key, string value)
Sets the value for the specified key in the configuration.
- Parameters
key: The key of the configuration value to set.value: The value to set for the specified key.
 
GetConfigPath
public string GetConfigPath()
Retrieves the path of the configuration file.
- Returns
- A string representing the path of the configuration file.
 
 
Dependencies 📦
System.Text.Json: For JSON serialization and deserialization.Microsoft.Extensions.Configuration: For configuration management.
Notes 📝
- Configuration file path is resolved relative to the application's base directory.
 - The configuration file is expected to be in JSON format.
 - Configuration file is automatically reloaded when changes occur.
 
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net8.0 is compatible. 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.
- 
                                                    
net8.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
 - Microsoft.Extensions.Configuration.Json (>= 8.0.0)
 
 
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.