Pipoburgos.SharedKernel.Api
7.0.1
.NET 6.0
dotnet add package Pipoburgos.SharedKernel.Api --version 7.0.1
NuGet\Install-Package Pipoburgos.SharedKernel.Api -Version 7.0.1
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="Pipoburgos.SharedKernel.Api" Version="7.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pipoburgos.SharedKernel.Api --version 7.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Pipoburgos.SharedKernel.Api, 7.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Pipoburgos.SharedKernel.Api as a Cake Addin
#addin nuget:?package=Pipoburgos.SharedKernel.Api&version=7.0.1
// Install Pipoburgos.SharedKernel.Api as a Cake Tool
#tool nuget:?package=Pipoburgos.SharedKernel.Api&version=7.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
The following code demonstrates basic usage of SharedKernel api.
appsettings.json
{
"AllowedHosts": "",
"Origins": [
"https://localhost/"
],
"SmtpSettings": {
"MailServer": "smtp",
"MailPort": 587,
"SenderName": "SharedKernel@SharedKernel.com",
"Sender": "SharedKernel@SharedKernel.com",
"Password": "SharedKernel"
},
"OpenApiOptions": {
"Title": "SharedKernel",
"AppName": "SharedKernel",
"Name": "SharedKernel",
"XmlDocumentationFile": "SharedKernel.Api.xml"
},
"ConnectionStrings": {
"PaymentConnection": "Server=.;Database=Payment;Trusted_Connection=True;MultipleActiveResultSets=true;Application Name=Payment;",
"PurchasingConnection": "Server=.;Database=Purchasing;Trusted_Connection=True;MultipleActiveResultSets=true;Application Name=Purchasing;"
},
"RabbitMq": {
"Username": "guest",
"Password": "guest",
"Hostname": "localhost",
"port": "5672"
},
"RedisCacheOptions": {
"ConnectionString": "localhost:6379",
"Configuration": "localhost:6379",
"InstanceName": "sharedKernel"
},
}
Startup.cs
See register module information
public class Startup
{
public class Startup
{
private const string CorsPolicy = "CorsPolicy";
private IConfiguration Configuration { get; }
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
{
services
.AddSharedKernel()
.AddSharedKernelApi<FluentApiSampleValidator>(CorsPolicy, Configuration.GetSection("Origins").Get<string[]>())
.AddSharedKernelHealthChecks()
.AddSharedKernelOpenApi(Configuration)
// Cache
.AddRedisDistributedCache(Configuration)
// .AddInMemoryCache()
.AddInMemoryCommandBus()
.AddInMemoryQueryBus()
// Event bus
.AddRabbitMqEventBus(Configuration)
// .AddInMemoryEventBus()
//.AddRedisEventBus(Configuration)
// Add modules
.AddPaymentModule(Configuration, "PaymentConnection")
.AddPurchasingModule(Configuration, "PurchasingConnection")
// Register all domain event subscribers
.AddDomainEventSubscribers();
}
public void Configure(IApplicationBuilder app, IOptions<OpenApiOptions> options)
{
// Other usages
app.UseCors(CorsPolicy);
// Other usages
app
.UseEndpoints(endpoints =>
{
endpoints.MapHealthChecks("/health", new HealthCheckOptions
{
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
endpoints.MapControllers();
})
.UseSharedKernelMetrics()
.UseSharedKernelOpenApi(options);
}
}
}
Product | Versions |
---|---|
.NET | net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- App.Metrics.AspNetCore (>= 4.3.0)
- App.Metrics.AspNetCore.Endpoints (>= 4.3.0)
- App.Metrics.AspNetCore.Tracking (>= 4.3.0)
- App.Metrics.Formatters.Prometheus (>= 4.3.0)
- AspNetCore.HealthChecks.UI.Client (>= 6.0.5)
- FluentValidation.AspNetCore (>= 11.2.2)
- MicroElements.Swashbuckle.FluentValidation (>= 5.7.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 6.0.10)
- Microsoft.AspNetCore.Mvc.Versioning (>= 5.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Debug (>= 7.0.0)
- Pipoburgos.SharedKernel.Infrastructure (>= 7.0.1)
- prometheus-net.AspNetCore (>= 6.0.0)
- Swashbuckle.AspNetCore.Newtonsoft (>= 6.4.0)
- Swashbuckle.AspNetCore.SwaggerUI (>= 6.4.0)
- Unchase.Swashbuckle.AspNetCore.Extensions (>= 2.7.1)
-
net7.0
- App.Metrics.AspNetCore (>= 4.3.0)
- App.Metrics.AspNetCore.Endpoints (>= 4.3.0)
- App.Metrics.AspNetCore.Tracking (>= 4.3.0)
- App.Metrics.Formatters.Prometheus (>= 4.3.0)
- FluentValidation.AspNetCore (>= 11.2.2)
- MicroElements.Swashbuckle.FluentValidation (>= 5.7.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 7.0.1)
- Microsoft.AspNetCore.Mvc.Versioning (>= 5.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Debug (>= 7.0.0)
- Pipoburgos.SharedKernel.Infrastructure (>= 7.0.1)
- prometheus-net.AspNetCore (>= 7.0.0)
- Swashbuckle.AspNetCore.Newtonsoft (>= 6.4.0)
- Swashbuckle.AspNetCore.SwaggerUI (>= 6.4.0)
- Unchase.Swashbuckle.AspNetCore.Extensions (>= 2.7.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 |
---|---|---|
7.0.1 | 109 | 12/19/2022 |
7.0.0 | 179 | 11/14/2022 |
6.0.54 | 221 | 10/21/2022 |
6.0.53 | 234 | 10/20/2022 |
6.0.52 | 212 | 10/6/2022 |
6.0.51 | 210 | 10/5/2022 |
6.0.50 | 237 | 9/30/2022 |
6.0.49 | 260 | 9/27/2022 |
6.0.48 | 261 | 9/22/2022 |
6.0.47 | 275 | 9/20/2022 |
6.0.46 | 297 | 8/27/2022 |
6.0.45 | 286 | 8/26/2022 |
6.0.44 | 274 | 8/26/2022 |
6.0.43 | 288 | 8/23/2022 |
6.0.42 | 267 | 8/23/2022 |
6.0.41 | 301 | 8/16/2022 |
6.0.40 | 280 | 8/16/2022 |
6.0.39 | 306 | 8/4/2022 |
6.0.38 | 283 | 8/4/2022 |
6.0.37 | 284 | 8/4/2022 |
6.0.36 | 274 | 8/4/2022 |
6.0.35 | 278 | 8/4/2022 |
6.0.34 | 298 | 8/3/2022 |
6.0.33 | 285 | 8/3/2022 |
6.0.32 | 300 | 8/3/2022 |
6.0.31 | 292 | 8/3/2022 |
6.0.29 | 344 | 7/22/2022 |
6.0.28 | 336 | 7/14/2022 |
6.0.27 | 327 | 7/12/2022 |
6.0.26 | 336 | 7/12/2022 |
6.0.25 | 332 | 6/23/2022 |
6.0.24 | 331 | 6/23/2022 |
6.0.23 | 315 | 6/22/2022 |
6.0.22 | 317 | 6/22/2022 |
6.0.21 | 305 | 6/21/2022 |
6.0.20 | 345 | 5/26/2022 |
6.0.19 | 325 | 5/13/2022 |
6.0.17 | 379 | 5/10/2022 |
6.0.16 | 352 | 4/27/2022 |
6.0.15 | 394 | 3/18/2022 |
6.0.14 | 362 | 3/16/2022 |
6.0.13 | 413 | 2/25/2022 |
6.0.12 | 382 | 2/25/2022 |
6.0.11 | 415 | 2/2/2022 |
6.0.10 | 422 | 1/24/2022 |
6.0.9 | 422 | 1/24/2022 |
6.0.8 | 394 | 1/24/2022 |
6.0.7 | 416 | 1/24/2022 |
6.0.6 | 411 | 1/20/2022 |
6.0.5 | 444 | 1/19/2022 |
6.0.4 | 261 | 12/30/2021 |
6.0.3 | 373 | 12/14/2021 |
6.0.2 | 280 | 12/14/2021 |
6.0.1 | 387 | 11/30/2021 |
6.0.0 | 2,062 | 11/26/2021 |
6.0.0-rc3 | 125 | 11/16/2021 |
6.0.0-rc2 | 107 | 11/15/2021 |
6.0.0-rc1 | 159 | 11/10/2021 |
5.0.41 | 401 | 10/31/2021 |
5.0.40 | 419 | 10/20/2021 |
5.0.39 | 440 | 10/8/2021 |
5.0.35 | 421 | 10/6/2021 |
5.0.34 | 395 | 10/6/2021 |
5.0.33 | 400 | 10/5/2021 |
5.0.32 | 361 | 10/5/2021 |
5.0.31 | 421 | 10/4/2021 |
5.0.30 | 323 | 10/4/2021 |
5.0.29 | 492 | 10/2/2021 |
5.0.28 | 440 | 10/2/2021 |
5.0.27 | 387 | 10/2/2021 |
5.0.26 | 333 | 10/2/2021 |
5.0.25 | 382 | 9/28/2021 |
5.0.24 | 401 | 9/22/2021 |
5.0.23 | 464 | 9/11/2021 |
5.0.22 | 420 | 9/10/2021 |
5.0.21 | 406 | 8/29/2021 |
5.0.20 | 422 | 8/9/2021 |
5.0.19 | 459 | 7/21/2021 |
5.0.18 | 443 | 1/10/2021 |
5.0.17 | 401 | 12/30/2020 |
5.0.16 | 444 | 12/21/2020 |
5.0.15 | 502 | 12/19/2020 |
5.0.14 | 502 | 12/19/2020 |
5.0.13 | 512 | 12/18/2020 |
5.0.12 | 453 | 12/12/2020 |
5.0.11 | 440 | 12/10/2020 |
5.0.10 | 386 | 12/9/2020 |
5.0.9 | 409 | 12/9/2020 |
5.0.8 | 412 | 12/9/2020 |
5.0.7 | 435 | 12/9/2020 |
5.0.6 | 484 | 12/7/2020 |
5.0.5 | 395 | 12/7/2020 |
5.0.4 | 434 | 12/7/2020 |
5.0.3 | 462 | 11/24/2020 |
5.0.2 | 493 | 11/24/2020 |
5.0.1 | 444 | 11/18/2020 |
5.0.0 | 491 | 11/14/2020 |