public void RegisterServices(IContainer container, CompositionRootSettings settings) { Guard.ArgumentIsNotNull(settings.ApplicationAssemblies, nameof(settings.ApplicationAssemblies)); container.RegisterSingleton<IQueryDispatcher, QueryDispatcher>(); container.RegisterCollection(typeof(IQueryHandler<,>), settings.ApplicationAssemblies); container.RegisterCollection(typeof(IQueryAsyncHandler<,>), settings.ApplicationAssemblies); container.RegisterDecoratorSingleton( typeof(IQueryHandler<,>), typeof(QueryLoggerDecorator<,>)); container.RegisterDecoratorSingleton( typeof(IQueryHandler<,>), typeof(QueryLifetimeScopeDecorator<,>)); container.RegisterDecoratorSingleton( typeof(IQueryAsyncHandler<,>), typeof(QueryAsyncLoggerDecorator<,>)); container.RegisterDecoratorSingleton( typeof(IQueryAsyncHandler<,>), typeof(QueryAsyncLifetimeScopeDecorator<,>)); }
public void RegisterServices(IContainer container, CompositionRootSettings settings) { Guard.ArgumentIsNotNull(settings.ApplicationAssemblies, nameof(settings.ApplicationAssemblies)); container.RegisterSingleton<IApplicationEventDispatcher, ApplicationEventDispatcher>(); container.RegisterCollection(typeof (IApplicationEventHandler<>), settings.ApplicationAssemblies); container.RegisterSingleton<IDomainEventDispatcher, DomainEventDispatcher>(); container.RegisterCollection(typeof (IDomainEventHandler<>), settings.ApplicationAssemblies); container.RegisterDecoratorSingleton( typeof (IApplicationEventHandler<>), typeof (ApplicationEventLoggerDecorator<>)); container.RegisterDecoratorSingleton( typeof (IDomainEventHandler<>), typeof (DomainEventLoggerDecorator<>)); container.RegisterDecoratorSingleton( typeof(IApplicationEventHandler<>), typeof(ApplicationEventLifetimeScopeDecorator<>)); }
public void RegisterServices(IContainer container, CompositionRootSettings settings) { Guard.ArgumentIsNotNull(settings.ApplicationAssemblies, nameof(settings.ApplicationAssemblies)); container.RegisterSingleton<ICommandDispatcher, CommandDispatcher>(); container.RegisterTransient(typeof (ICommandHandler<>), settings.ApplicationAssemblies); container.RegisterScoped<ICommandPostAction, CommandPostAction>(); container.RegisterDecoratorTransient( typeof (ICommandHandler<>), typeof (DomainEventDispatcherDecorator<>)); container.RegisterDecoratorTransient( typeof (ICommandHandler<>), typeof (CommandTransactionDecorator<>)); container.RegisterDecoratorTransient( typeof (ICommandHandler<>), typeof (CommandPostActionDecorator<>)); container.RegisterDecoratorSingleton( typeof (ICommandHandler<>), typeof (ApplicationEventDispatcherDecorator<>)); container.RegisterDecoratorSingleton( typeof (ICommandHandler<>), typeof (CommandValidationDecorator<>)); container.RegisterDecoratorSingleton( typeof (ICommandHandler<>), typeof (CommandLoggerDecorator<>)); container.RegisterDecoratorSingleton( typeof(ICommandHandler<>), typeof(CommandLifetimeScopeDecorator<>)); }