SFERA.Helpers.AppSettingsJSON
1.2024.327.3
dotnet add package SFERA.Helpers.AppSettingsJSON --version 1.2024.327.3
NuGet\Install-Package SFERA.Helpers.AppSettingsJSON -Version 1.2024.327.3
<PackageReference Include="SFERA.Helpers.AppSettingsJSON" Version="1.2024.327.3" />
paket add SFERA.Helpers.AppSettingsJSON --version 1.2024.327.3
#r "nuget: SFERA.Helpers.AppSettingsJSON, 1.2024.327.3"
// Install SFERA.Helpers.AppSettingsJSON as a Cake Addin
#addin nuget:?package=SFERA.Helpers.AppSettingsJSON&version=1.2024.327.3
// Install SFERA.Helpers.AppSettingsJSON as a Cake Tool
#tool nuget:?package=SFERA.Helpers.AppSettingsJSON&version=1.2024.327.3
Very simple helper for reading, using one single method, keys from local appsettings.json (or whatever file).
Ideal also for reading connection strings.
Here the code:
Console.WriteLine(SFERA.Helpers.AppSettingsJSON.AppSettings.Get("key1"));
Console.WriteLine(SFERA.Helpers.AppSettingsJSON.AppSettings.Get("key2", "D:\\SFERA.Helpers\\Sample\\appsettings.json"));
Console.WriteLine(SFERA.Helpers.AppSettingsJSON.ConnectionStrings.Get("cn1"));
Console.WriteLine(SFERA.Helpers.AppSettingsJSON.ConnectionStrings.Get("cn2", "D:\\SFERA.Helpers\\Sample\\appsettings.json"));
Here the appsettings.json:
{
"ConnectionStrings": {
"cn1": "Persist Security Info=True;Initial Catalog=mycatalog1;server=server.com;User Id=user;Password=pwd;Max Pool Size=500;",
"cn2": "Persist Security Info=True;Initial Catalog=mycatalog2;server=server.com;User Id=user;Password=pwd;Max Pool Size=500;"
},
"AppSettings": {
"key1": "value1",
"key2": "value2"
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 is compatible. 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 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net48 is compatible. net481 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
-
.NETFramework 4.8
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
-
.NETFramework 4.8.1
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
-
net6.0
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
-
net7.0
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
-
net8.0
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- SFERA.Helpers.BaseClass (>= 2.2024.301.1)
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.2024.327.3 | 134 | 3/27/2024 |
1.2024.327.1 | 94 | 3/27/2024 |
1.2023.829.1 | 328 | 8/29/2023 |
1.2023.214.1 | 397 | 2/14/2023 |
1.2021.1209.1 | 448 | 12/9/2022 |
1.2021.3 | 741 | 12/6/2021 |
1.2021.2 | 486 | 11/12/2021 |
1.2021.1 | 543 | 7/12/2021 |
1.2020.123 | 526 | 1/19/2021 |
1.2020.121 | 494 | 1/19/2021 |
1.2020.120 | 557 | 11/25/2020 |
1.2020.118.116 | 602 | 4/27/2020 |
1.2020.8.113 | 675 | 1/8/2020 |
1.2019.297.96 | 707 | 10/24/2019 |
1.2019.294.95 | 643 | 10/21/2019 |
1.2019.151.74 | 737 | 5/31/2019 |
1.2019.147.71 | 752 | 5/27/2019 |
1.2019.118.30 | 719 | 4/28/2019 |
1.2019.117.29 | 710 | 4/27/2019 |
1.2019.116.25 | 698 | 4/26/2019 |
1.2019.112.8 | 824 | 4/22/2019 |
Added Net8 support.