magic.lambda.config
15.5.0
See the version list below for details.
dotnet add package magic.lambda.config --version 15.5.0
NuGet\Install-Package magic.lambda.config -Version 15.5.0
<PackageReference Include="magic.lambda.config" Version="15.5.0" />
paket add magic.lambda.config --version 15.5.0
#r "nuget: magic.lambda.config, 15.5.0"
// Install magic.lambda.config as a Cake Addin #addin nuget:?package=magic.lambda.config&version=15.5.0 // Install magic.lambda.config as a Cake Tool #tool nuget:?package=magic.lambda.config&version=15.5.0
magic.lambda.config - Accessing your server's configuration from Hyperlambda
This project provides configuration settings slots for Magic. The project provides the following slots, allowing you to retrieve configuration settings from your "appsettings.json" configuration file, in addition to saving and loading your configuration file.
- [config.get] - Returns a configuration value from your configuration file with the specified key
- [config.section] - Returns the specified configuration section from your configuration file with the specified key
- [config.load] - Loads your "appsettings.json" file and returns as a string
- [config.save] - Saves your "appsettings.json" file, sanity checking it's valid JSON before persisting your file
How to use [config.get]
This slot allows you to retrieve configuration settings. To retrieve settings you can supply a "path" such as "foo:bar" to for instance an invocation to [config.get]. This will traverse into your "foo" config setting, find its "bar" key, and return the value of your "bar" key. Below is an example of usage.
config.get:"foo:bar"
Assuming your configuration file looks like the following.
{
"foo": {
"bar": 42
}
}
... afterwards the value of your [config.get] node will be the following.
config.get:42
Notice - Due to implementation details of .Net and its IConfiguration
specifically, values
returned will always be strings, and you'll have to manually convert these to other types, using for
instance the [convert] slot from magic.lambda. This might change in a future release though.
You can also provide a default value that will be returned if no configuration value is found, such
as the following illustrates.
.foo:foo
config.get:"magic:foo:non-existing-key"
get-value:x:@.foo
Since the above "non-existing-key" doesn't exist in your configuration file, the above Hyperlambda will return the value "foo" being the result of the invocation to the [get-value] slot. This allows you to create default values your code resorts to if the specified configuration setting doesn't exist.
Project website for magic.lambda.config
The source code for this repository can be found at github.com/polterguy/magic.lambda.config, and you can provide feedback, provide bug reports, etc at the same place.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 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. |
-
.NETStandard 2.1
- magic.node.extensions (>= 15.5.0)
- magic.signals.contracts (>= 15.5.0)
- Microsoft.Extensions.Configuration (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on magic.lambda.config:
Package | Downloads |
---|---|
magic.library
Helper project for Magic to wire up everything easily by simply adding one package, and invoking two simple methods. When using Magic, this is (probably) the only package you should actually add, since this package pulls in everything else you'll need automatically, and wires up everything sanely by default. To use package go to https://polterguy.github.io |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
17.2.0 | 449 | 1/22/2024 |
17.1.7 | 202 | 1/12/2024 |
17.1.6 | 164 | 1/11/2024 |
17.1.5 | 185 | 1/5/2024 |
17.0.1 | 254 | 1/1/2024 |
17.0.0 | 378 | 12/14/2023 |
16.11.5 | 357 | 11/12/2023 |
16.9.0 | 337 | 10/9/2023 |
16.7.0 | 557 | 7/11/2023 |
16.4.1 | 394 | 7/2/2023 |
16.4.0 | 403 | 6/22/2023 |
16.3.1 | 348 | 6/7/2023 |
16.3.0 | 350 | 5/28/2023 |
16.1.9 | 628 | 4/30/2023 |
15.10.11 | 461 | 4/13/2023 |
15.9.1 | 614 | 3/27/2023 |
15.9.0 | 477 | 3/24/2023 |
15.8.2 | 514 | 3/20/2023 |
15.7.0 | 391 | 3/6/2023 |
15.5.0 | 1,573 | 1/28/2023 |
15.2.0 | 675 | 1/18/2023 |
15.1.0 | 1,172 | 12/28/2022 |
14.5.7 | 721 | 12/13/2022 |
14.5.5 | 805 | 12/6/2022 |
14.5.1 | 667 | 11/23/2022 |
14.5.0 | 616 | 11/18/2022 |
14.4.5 | 699 | 10/22/2022 |
14.4.1 | 740 | 10/22/2022 |
14.4.0 | 648 | 10/17/2022 |
14.3.1 | 1,234 | 9/12/2022 |
14.3.0 | 646 | 9/10/2022 |
14.1.3 | 900 | 8/7/2022 |
14.1.2 | 663 | 8/7/2022 |
14.1.1 | 667 | 8/7/2022 |
14.0.14 | 683 | 7/26/2022 |
14.0.12 | 659 | 7/24/2022 |
14.0.11 | 628 | 7/23/2022 |
14.0.10 | 630 | 7/23/2022 |
14.0.9 | 646 | 7/23/2022 |
14.0.8 | 732 | 7/17/2022 |
14.0.5 | 796 | 7/11/2022 |
14.0.4 | 772 | 7/6/2022 |
14.0.3 | 700 | 7/2/2022 |
14.0.2 | 677 | 7/2/2022 |
14.0.0 | 869 | 6/25/2022 |
13.4.0 | 2,088 | 5/31/2022 |
13.3.4 | 1,429 | 5/9/2022 |
13.3.0 | 961 | 5/1/2022 |
13.2.2 | 730 | 4/25/2022 |
13.2.0 | 920 | 4/21/2022 |
13.1.0 | 1,031 | 4/7/2022 |
13.0.0 | 730 | 4/5/2022 |
11.0.5 | 1,432 | 3/2/2022 |
11.0.4 | 778 | 2/22/2022 |
11.0.3 | 767 | 2/9/2022 |
11.0.2 | 835 | 2/6/2022 |
11.0.1 | 784 | 2/5/2022 |
10.0.21 | 770 | 1/28/2022 |
10.0.20 | 759 | 1/27/2022 |
10.0.19 | 756 | 1/23/2022 |
10.0.18 | 735 | 1/17/2022 |
10.0.16 | 720 | 1/14/2022 |
10.0.15 | 689 | 12/31/2021 |
10.0.14 | 581 | 12/28/2021 |
10.0.7 | 1,490 | 12/22/2021 |
10.0.5 | 732 | 12/18/2021 |
9.9.9 | 1,634 | 11/29/2021 |
9.9.3 | 908 | 11/9/2021 |
9.9.2 | 641 | 11/4/2021 |
9.9.0 | 744 | 10/30/2021 |
9.8.9 | 690 | 10/29/2021 |
9.8.7 | 654 | 10/27/2021 |
9.8.6 | 623 | 10/27/2021 |
9.8.5 | 630 | 10/26/2021 |
9.8.0 | 1,369 | 10/20/2021 |
9.7.9 | 651 | 10/19/2021 |
9.7.5 | 1,498 | 10/14/2021 |
9.7.0 | 844 | 10/9/2021 |
9.6.6 | 1,217 | 8/14/2021 |
9.2.0 | 6,236 | 5/26/2021 |
9.1.4 | 1,246 | 4/21/2021 |
9.1.0 | 1,039 | 4/14/2021 |
9.0.0 | 854 | 4/5/2021 |
8.9.9 | 990 | 3/30/2021 |
8.9.3 | 1,551 | 3/19/2021 |
8.9.2 | 1,015 | 1/29/2021 |
8.9.1 | 1,017 | 1/24/2021 |
8.9.0 | 1,088 | 1/22/2021 |
8.6.9 | 2,951 | 11/8/2020 |
8.6.6 | 1,982 | 11/2/2020 |
8.6.0 | 3,919 | 10/28/2020 |
8.5.0 | 1,892 | 10/23/2020 |
8.4.0 | 5,537 | 10/13/2020 |
8.3.1 | 2,576 | 10/5/2020 |
8.3.0 | 1,223 | 10/3/2020 |
8.2.2 | 1,998 | 9/26/2020 |
8.2.1 | 1,309 | 9/25/2020 |
8.2.0 | 1,357 | 9/25/2020 |
8.1.17 | 6,595 | 9/13/2020 |
8.1.16 | 596 | 9/13/2020 |
8.1.15 | 1,876 | 9/12/2020 |
8.1.11 | 2,473 | 9/11/2020 |
8.1.10 | 1,281 | 9/6/2020 |
8.1.9 | 1,320 | 9/3/2020 |
8.1.8 | 1,274 | 9/2/2020 |
8.1.7 | 1,194 | 8/28/2020 |
8.1.4 | 1,208 | 8/25/2020 |
8.1.3 | 1,289 | 8/18/2020 |
8.1.2 | 1,215 | 8/16/2020 |
8.1.1 | 1,268 | 8/15/2020 |
8.1.0 | 591 | 8/15/2020 |
8.0.1 | 2,656 | 8/7/2020 |
8.0.0 | 1,222 | 8/7/2020 |
7.0.1 | 1,337 | 6/28/2020 |
7.0.0 | 1,232 | 6/28/2020 |
5.0.0 | 7,329 | 2/25/2020 |
4.0.4 | 7,724 | 1/27/2020 |
4.0.3 | 1,266 | 1/27/2020 |
4.0.2 | 1,376 | 1/16/2020 |
4.0.1 | 1,368 | 1/11/2020 |
4.0.0 | 1,363 | 1/5/2020 |
3.1.0 | 6,208 | 11/10/2019 |
3.0.0 | 3,812 | 10/23/2019 |
2.0.1 | 8,206 | 10/15/2019 |
2.0.0 | 1,623 | 10/13/2019 |
1.1.8 | 1,345 | 10/11/2019 |
1.1.7 | 1,278 | 10/10/2019 |
1.1.6 | 570 | 10/9/2019 |
1.1.5 | 611 | 10/6/2019 |
1.1.4 | 621 | 10/6/2019 |
1.1.2 | 610 | 10/5/2019 |
1.0.0 | 680 | 9/26/2019 |