![]() |
VOOZH | about |
dotnet add package CleanArchitecture.Core.Infrastructure --version 1.0.0-alpha.4
NuGet\Install-Package CleanArchitecture.Core.Infrastructure -Version 1.0.0-alpha.4
<PackageReference Include="CleanArchitecture.Core.Infrastructure" Version="1.0.0-alpha.4" />
<PackageVersion Include="CleanArchitecture.Core.Infrastructure" Version="1.0.0-alpha.4" />Directory.Packages.props
<PackageReference Include="CleanArchitecture.Core.Infrastructure" />Project file
paket add CleanArchitecture.Core.Infrastructure --version 1.0.0-alpha.4
#r "nuget: CleanArchitecture.Core.Infrastructure, 1.0.0-alpha.4"
#:package CleanArchitecture.Core.Infrastructure@1.0.0-alpha.4
#addin nuget:?package=CleanArchitecture.Core.Infrastructure&version=1.0.0-alpha.4&prereleaseInstall as a Cake Addin
#tool nuget:?package=CleanArchitecture.Core.Infrastructure&version=1.0.0-alpha.4&prereleaseInstall as a Cake Tool
Core infrastructure implementations including custom mediator, event dispatchers, and dependency injection extensions for Clean Architecture.
This package provides ready-to-use implementations of IMediator, IDomainEventDispatcher, and IIntegrationEventDispatcher with dependency injection extensions. It works with CleanArchitecture.Core.Application to provide a complete CQRS and event-driven architecture foundation.
dotnet add package CleanArchitecture.Core.Infrastructure
services.AddCoreInfrastructure();
services.AddCoreInfrastructure(options =>
{
options.RegisterConvention = true;
// or provide custom convention
options.CustomConvention = new CustomIntegrationEventConvention();
});
public class ProductService
{
private readonly IMediator _mediator;
public ProductService(IMediator mediator)
{
_mediator = mediator;
}
public async Task<Result<Guid>> CreateProduct(string name)
{
var command = new CreateProductCommand(name);
return await _mediator.Send(command);
}
}
public class OrderService
{
private readonly IDomainEventDispatcher _domainEventDispatcher;
private readonly IIntegrationEventDispatcher _integrationEventDispatcher;
public async Task CompleteOrder(Order order)
{
// Domain events are dispatched within transaction
await _domainEventDispatcher.PublishAsync(new OrderCompletedEvent(order.Id));
// Integration events are dispatched via outbox pattern
await _integrationEventDispatcher.PublishAsync(new OrderCompletedIntegrationEvent(order.Id));
}
}
CustomMediator - Implementation of IMediatorDomainEventDispatcher - Implementation of IDomainEventDispatcherIntegrationEventDispatcher - Implementation of IIntegrationEventDispatcherDefaultIntegrationEventConvention - Default convention for discovering integration eventsRequires CleanArchitecture.Core.Application and CleanArchitecture.Core.Domain.
GitHub: https://github.com/mohd2sh/CleanArchitecture-DDD-CQRS
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.4 | 203 | 11/10/2025 |
| 1.0.0-alpha.3 | 186 | 11/10/2025 |