graydart.tools.appsettings_reader 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package graydart.tools.appsettings_reader --version 1.0.0
                    
NuGet\Install-Package graydart.tools.appsettings_reader -Version 1.0.0
                    
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="graydart.tools.appsettings_reader" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="graydart.tools.appsettings_reader" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="graydart.tools.appsettings_reader" />
                    
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 graydart.tools.appsettings_reader --version 1.0.0
                    
#r "nuget: graydart.tools.appsettings_reader, 1.0.0"
                    
#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.
#addin nuget:?package=graydart.tools.appsettings_reader&version=1.0.0
                    
Install graydart.tools.appsettings_reader as a Cake Addin
#tool nuget:?package=graydart.tools.appsettings_reader&version=1.0.0
                    
Install graydart.tools.appsettings_reader as a Cake Tool

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.

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.0.2 119 3 months ago
1.0.1 94 3 months ago
1.0.0 94 4 months ago