/// <summary> /// Gets the event bus. /// </summary> /// <param name="serviceLocator">The service locator.</param> /// <returns></returns> protected override IEventBus GetEventBus(IServiceLocator serviceLocator) { var typeCatalog = new AssemblyTypeCatalog(this.GetAssembliesToScan(serviceLocator)); var domainEventHandlerFactory = new DomainEventHandlerFactory(serviceLocator); var domainEventTypes = typeCatalog.GetGenericInterfaceImplementations(typeof(IHandleDomainEvents <>)); return(new LocalEventBus(domainEventTypes, domainEventHandlerFactory)); }
protected override ITypeCatalog GetTypeCatalog(IServiceLocator serviceLocator) { var assemblyTypeCatalog = new AssemblyTypeCatalog(new [] { typeof(TestingRuntime).Assembly }); return(new TestingAssemblyTypeCatalog(assemblyTypeCatalog)); }