AppSettings_Reader 1.0.0

Suggested Alternatives

graydart.tools.appsettings_reader

Additional Details

this package has been depreciated, please use the alternative

dotnet tool install --global AppSettings_Reader --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local AppSettings_Reader --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=AppSettings_Reader&version=1.0.0
                    
nuke :add-package AppSettings_Reader --version 1.0.0
                    

AppSettings Reader Helper

Overview

Hashing Tool is a .NET library that provides methods to generate MD5 / SHA256 / SHA512 / RSA /Encrypt / Decrypt hash from string, object. It uses the System.Security.Cryptography class to generate the hash.

dotnet add package AppSettings_Reader --version 1.0

Include

using AppSettings_Reader;

// Declare object (default directory:"./", Default filename: "appsettings.json")
var appSettingHelper=new Helper();

// Declare object specifying directory and file name
var appSettingHelper=new Helper("./","MyAppSettings.json");

App Setting or any Json file reader methods

//Read value by providing section and key
var appName=appSettingHelper.GetSettingsBySectionAndKey("APP_Detail","Name");

//Read value as dynamic object by section and key
MyClass myappDetail=appSettingHelper.GetSettingsBySectionAndKey<MyClass>("APP_Setting","APP_Detail");

//Read value by providing key (default section 'AppSettings')
var appName=appSettingHelper.GetAppSettingsKeyValue("App_Version");

//Read value as a object by providing key (default section 'AppSettings')
MyClass myappDetail=appSettingHelper.GetSettingsBySectionAndKey<MyClass>("App_Detail");

// Read connection string from app settings / json file , Default section "ConnectionStrings"
string connectionString=appSettingHelper.GetConnectionString("SQLConnString");

Sample file format (AppSettings.json)

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information",
      "Log4Net": "Error"
    }
  },
  "ConnectionStrings": {
  "SQLConnString":"Data..."
  },
  "AppSettings":{
  }
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

This library is licensed under the MIT License. See the LICENSE file for more details.

Contributions

Contributions to this library are welcome. Please open an issue or submit a pull request with your changes

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.0 120 3 months ago 1.0.0 is deprecated because it is no longer maintained.