From b1e3bdefbe817934ce96598e66829b51888ba357 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Wed, 8 Nov 2017 11:36:10 -0800 Subject: [PATCH] Cleaned-up the registration of DomainEventHandlers and FluentValidation Validators --- .../Infrastructure/AutofacModules/MediatorModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/AutofacModules/MediatorModule.cs b/src/Services/Ordering/Ordering.API/Infrastructure/AutofacModules/MediatorModule.cs index b23f6812a..d54be0a45 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/AutofacModules/MediatorModule.cs +++ b/src/Services/Ordering/Ordering.API/Infrastructure/AutofacModules/MediatorModule.cs @@ -23,11 +23,11 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Autof builder.RegisterAssemblyTypes(typeof(CreateOrderCommand).GetTypeInfo().Assembly) .AsClosedTypesOf(typeof(IAsyncRequestHandler<,>)); - // Register all the event classes (they implement IAsyncNotificationHandler) in assembly holding the Commands + // Register the DomainEventHandler classes (they implement IAsyncNotificationHandler<>) in assembly holding the Domain Events builder.RegisterAssemblyTypes(typeof(ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler).GetTypeInfo().Assembly) .AsClosedTypesOf(typeof(IAsyncNotificationHandler<>)); - + // Register the Command's Validators (Validators based on FluentValidation library) builder .RegisterAssemblyTypes(typeof(CreateOrderCommandValidator).GetTypeInfo().Assembly) .Where(t => t.IsClosedTypeOf(typeof(IValidator<>)))