Finlex.Common
1.4.0
dotnet add package Finlex.Common --version 1.4.0
NuGet\Install-Package Finlex.Common -Version 1.4.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="Finlex.Common" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Finlex.Common --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Finlex.Common, 1.4.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.
// Install Finlex.Common as a Cake Addin #addin nuget:?package=Finlex.Common&version=1.4.0 // Install Finlex.Common as a Cake Tool #tool nuget:?package=Finlex.Common&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Finlex Common Library
This repository offers a wide collection of .Net6 packages for widely used services and platforms.
.Net versions supported: 6.0
Sections
Health Check
var healthCheckOptions = builder.Configuration.GetSection("HealthCheckOptions").Get<HealthCheckOptions>();
builder.Services.UseHealthChecks(healthCheckOptions);
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.UseHealthChecks(healthCheckOptions.UIOption.RoutePattern);
});
"HealthCheckOptions": {
"SwaggerUrl": "http://localhost:5221/swagger/index.html",
"ConnectionString": "mongodb://localhost:27017/",
"Timeout": 3,
"UIOption": {
"ServiceName": "Sms Integration Service",
"RoutePattern": "/healthchecks",
"SetEvaluationTime": 15,
"MaximumHistoryEntriesPerEndpoint": 60,
"SetApiMaxActiveRequests" : 1
}
}
Hosting
builder.LogConfiguration();
builder.Services.AddTransient(typeof(IFinlexLogger<>), typeof(FinlexLogger<>));
app.UseMiddleware<LogTracerMiddleware>();
"Serilog": {
"Using": [ "Serilog.Sinks.Console" ],
"MinimumLevel": {
"Default": "Verbose",
"Override": {
"Microsoft": "Warning",
"Microsoft.AspNetCore": "Warning",
"System": "Error"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
"outputTemplate": "Finlex.Services.Xxx {Fx-Correlation-Id} {Fx-Span-No} {Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] ({SourceContext}.{Method}) {Message}{NewLine}{Exception}"
}
}
]
}
Swagger
var swaggerOptions = builder.Configuration.GetSection("SwaggerOptions").Get<List<SwaggerOption>>();
builder.Services.AddFinlexSwashbuckle(swaggerOptions);
MiddlewareExtensions.UseFinlexSwaggerUI(app, swaggerOptions);
"SwaggerOptions": [
{
"SwaggerUIName": "Finlex XXX Microservice",
"SwaggerEndpoint": "/swagger/v1/swagger.json",
"DocumentName": "v1",
"OpenApiInfo": {
"Version": "v1",
"Title": "Finlex XXX APIs",
"Description": "This is XXX APIs",
"Contact": {
"Name": "XXX, Backend Developer",
"Email": "xxx@finlex.de"
},
"License": {
"Name": "https://finlex.de/"
}
},
"SecurityDefinitionInfo": {
"Description": "JWT Authorization header using the Bearer scheme",
"Name": "Authorization",
"Scheme": "Bearer"
}
},
"ApiParameters": [
{
"Name": "Fx-Correlation-Id",
"In": "Header",
"Required": "false"
},
{
"Name": "Fx-Span-No",
"In": "Header",
"Required": "false"
}
]
]
Exception Handling
app.UseMiddleware(typeof(ExceptionHandlingMiddleware));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Amazon.S3 (>= 0.27.0)
- AspNetCore.HealthChecks.MongoDb (>= 6.0.2)
- AspNetCore.HealthChecks.UI (>= 6.0.5)
- AspNetCore.HealthChecks.UI.Client (>= 6.0.5)
- AspNetCore.HealthChecks.UI.InMemory.Storage (>= 6.0.5)
- AspNetCore.HealthChecks.Uris (>= 6.0.3)
- AWSSDK.S3 (>= 3.7.9.37)
- AWSSDK.SimpleNotificationService (>= 3.7.100.24)
- AWSSDK.SQS (>= 3.7.100.24)
- Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer (>= 5.0.0)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.OpenApi (>= 1.3.1)
- Newtonsoft.Json (>= 13.0.1)
- RestSharp (>= 107.3.0)
- Serilog (>= 2.11.0)
- Serilog.AspNetCore (>= 5.0.0)
- Serilog.Enrichers.AssemblyName (>= 1.0.9)
- Serilog.Enrichers.CorrelationId (>= 3.0.1)
- Serilog.Enrichers.Environment (>= 2.2.0)
- Serilog.Enrichers.Process (>= 2.0.2)
- Serilog.Enrichers.Thread (>= 3.1.0)
- Serilog.Extensions.Logging (>= 3.1.0)
- Swashbuckle.AspNetCore (>= 6.3.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Finlex.Common:
Package | Downloads |
---|---|
Finlex.Common.Infrastructure
Repository pattern for the dynamic data source including official .NET Core MongoDB driver and configured with Microsoft.Extensions.DependencyInjection. |
|
Finlex.Common.ExceptionHandling
A global exception handler middleware, allowing developers to create one or more exception handlers (interceptores). |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.4.0 | 256 | 5/22/2023 | |
1.3.0 | 297 | 3/22/2023 | |
1.2.3 | 217 | 3/22/2023 | |
1.2.2 | 225 | 3/21/2023 | |
1.2.1 | 239 | 3/21/2023 | |
1.2.0 | 274 | 3/6/2023 | |
1.1.5 | 914 | 11/14/2022 | |
1.1.4 | 364 | 11/14/2022 | |
1.1.3 | 501 | 8/23/2022 | |
1.1.2 | 492 | 8/11/2022 | |
1.1.1 | 481 | 8/4/2022 | |
1.1.0 | 443 | 8/4/2022 | |
1.0.9 | 506 | 8/3/2022 | |
1.0.8 | 493 | 7/29/2022 | |
1.0.7 | 544 | 6/14/2022 | |
1.0.6 | 489 | 6/14/2022 | |
1.0.5 | 516 | 5/18/2022 | |
1.0.4 | 1,160 | 4/29/2022 | |
1.0.3 | 569 | 4/6/2022 | |
1.0.2 | 636 | 3/8/2022 | |
1.0.1 | 482 | 3/7/2022 | |
1.0.0 | 1,272 | 2/8/2022 |