ChaseLabs.Configuration 0.1.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package ChaseLabs.Configuration --version 0.1.9                
NuGet\Install-Package ChaseLabs.Configuration -Version 0.1.9                
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="ChaseLabs.Configuration" Version="0.1.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ChaseLabs.Configuration --version 0.1.9                
#r "nuget: ChaseLabs.Configuration, 0.1.9"                
#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.
// Install ChaseLabs.Configuration as a Cake Addin
#addin nuget:?package=ChaseLabs.Configuration&version=0.1.9

// Install ChaseLabs.Configuration as a Cake Tool
#tool nuget:?package=ChaseLabs.Configuration&version=0.1.9                

Chase Labs Configuration Utility

This is a C# Config Manager Utility that allows easy config creation and use.

To Install<br>

with Package Manager<br>

Install-Package ChaseLabs.Configuration<br>

with Nuget Manager<br>

ChaseLabs.Configuration and Download Latest

For Sample Code Visit WIKI

Getting Started

public ConfigManager Manager;

public void HandleConfig()
{
    Manager = new ConfigManager("/Path/To/File.conf"); // Plain Text
    Manager = new ConfigManager("/Path/To/File.conf", true); // With Encryption and Salt is your machine name
    Manager = new ConfigManager("/Path/To/File.conf", true, "Encryption Password"); // With Encryption and Salt is "Encryption Password"
}

Creating Config Rule

The First Value of the Config Object is the Key and the second value is the Value For the initial Value should be the default value. It will be overruled if a config entry is found.

You do NOT need to create a config item, you can just call GetOrCreate and It will create an option

    Manager.Add("a string key", "text");
    Manager.Add("a bool key", false);
    Manager.Add("a float key", 1.0);
    Manager.Add("an int key", 1);

Getting Config Rule

Use the Method GetOrCreate([name], [default value]) to get the specified config value or have it created.

public string StringConfig = Manager.GetOrCreate("a string key", "default value").Value;


public bool BooleanConfig = Manager.GetOrCreate("a bool key", false).Value;


public float FloatConfig = Manager.GetOrCreate("a float key", 0.0f).Value;


public int IntConfig = Manager.GetOrCreate("an int key",0).Value;

Saving Config Rule

By setting the Config Value Equal to an appropriate value converted to string will automatically write to the config file

Manager.GetOrCreate("a string key", "Default Value").Value = "Hello";

Manager.GetOrCreate("a bool key", false).Value = true;

Manager.GetOrCreate("a float key", 0.0f).Value = 1.5;

Manager.GetOrCreate("an int key",0).Value = 1;
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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ChaseLabs.Configuration:

Package Downloads
ChaseLabs.Updater

An Easy to Use Update Utility

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 515 7/16/2022 0.2.0 is deprecated because it is no longer maintained.
0.1.9 404 7/11/2022
0.1.6 423 6/18/2022
0.1.4 449 2/13/2022
0.1.3 544 2/13/2022
0.1.2 540 2/13/2022
0.1.1 483 10/16/2021
0.0.6 336 3/29/2021
0.0.5 311 3/28/2021
0.0.4 1,278 4/17/2020
0.0.3 976 4/15/2020
0.0.2 592 4/5/2020
0.0.1 588 4/4/2020

Increased performance with larger datasets