NetBricks 1.0.0
See the version list below for details.
dotnet add package NetBricks --version 1.0.0
NuGet\Install-Package NetBricks -Version 1.0.0
<PackageReference Include="NetBricks" Version="1.0.0" />
paket add NetBricks --version 1.0.0
#r "nuget: NetBricks, 1.0.0"
// Install NetBricks as a Cake Addin #addin nuget:?package=NetBricks&version=1.0.0 // Install NetBricks as a Cake Tool #tool nuget:?package=NetBricks&version=1.0.0
Why NetBricks?
I found myself using a lot of the same code and techniques from project-to-project, however, I was always copying the code and then it would deviate. I decided instead to take the best components from all my recent solutions and put the base level components into something I am calling NetBricks.
Included:
- Config
- AccessTokenFetcher
- SingleLineConsoleLogger
Services
The entire solution depends on Dependency Injection. If you want everything, you should inject the following services...
services.AddHttpClient("netbricks");
services.AddSingleLineConsoleLogger();
services.AddAccessTokenFetcher();
services.AddConfig();
Config
This is a flexible and efficient configuration management solution that supports the following features:
- values can be pulled from environment variables
- values can be pulled from Azure App Configuration
- values that are URLs can be resolved to secrets in Azure Key Vault
- values can be cached
- values can be converted to the appropriate datatype
- defaults can be set
GetOnce()
If you need access to a value, don't need to resolve in Key Vault, and don't need to cache, use GetOnce(). You might also consider doing it as "static" since it has no requirement for an instance.
public static LogLevel LogLevel
{
get => GetOnce("APP_LOG_LEVEL", "LOG_LEVEL").AsEnum<LogLevel>(() => LogLevel.Information);
}
More to come...
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.1 is compatible. |
-
.NETCoreApp 3.1
- dotenv.net (>= 2.1.0)
- Microsoft.Azure.Services.AppAuthentication (>= 1.4.0)
- Microsoft.Identity.Client (>= 4.14.0)
- Microsoft.NET.Test.Sdk (>= 16.6.1)
- xunit (>= 2.4.1)
- xunit.runner.visualstudio (>= 2.4.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NetBricks:
Package | Downloads |
---|---|
CasAuth
The Comprehensive Authentication Solution (or CasAuth) was developed to provide an opinionated way to handle user and service authentication for APIs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.9.2 | 581 | 4/30/2024 |
1.9.1 | 115 | 4/29/2024 |
1.9.0 | 753 | 4/22/2024 |
1.8.0 | 196 | 4/19/2024 |
1.7.2 | 8,489 | 1/3/2023 |
1.7.1 | 2,706 | 7/8/2022 |
1.7.0 | 4,374 | 7/8/2022 |
1.6.2 | 2,552 | 6/15/2022 |
1.6.1 | 623 | 6/15/2022 |
1.6.0 | 3,737 | 2/28/2022 |
1.5.0 | 1,575 | 1/19/2022 |
1.4.1 | 660 | 1/19/2022 |
1.4.0 | 634 | 1/19/2022 |
1.3.0 | 1,052 | 9/8/2020 |
1.2.0 | 772 | 7/7/2020 |
1.1.0 | 504 | 7/7/2020 |
1.0.0 | 875 | 5/21/2020 |