Skip to content

Commit b1e3bde

Browse files
Cleaned-up the registration of DomainEventHandlers and FluentValidation Validators
1 parent d60e130 commit b1e3bde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Services/Ordering/Ordering.API/Infrastructure/AutofacModules/MediatorModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ protected override void Load(ContainerBuilder builder)
2323
builder.RegisterAssemblyTypes(typeof(CreateOrderCommand).GetTypeInfo().Assembly)
2424
.AsClosedTypesOf(typeof(IAsyncRequestHandler<,>));
2525

26-
// Register all the event classes (they implement IAsyncNotificationHandler) in assembly holding the Commands
26+
// Register the DomainEventHandler classes (they implement IAsyncNotificationHandler<>) in assembly holding the Domain Events
2727
builder.RegisterAssemblyTypes(typeof(ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler).GetTypeInfo().Assembly)
2828
.AsClosedTypesOf(typeof(IAsyncNotificationHandler<>));
2929

30-
30+
// Register the Command's Validators (Validators based on FluentValidation library)
3131
builder
3232
.RegisterAssemblyTypes(typeof(CreateOrderCommandValidator).GetTypeInfo().Assembly)
3333
.Where(t => t.IsClosedTypeOf(typeof(IValidator<>)))

0 commit comments

Comments
 (0)