public static void ConfigureDomainEvents(this IContainer container) { container.Configure(config => { var di = new AppDependencyInjectionContainer(t => container.GetNestedContainer().GetInstance(t)); config.For <EventManager>().Use(t => new EventManager(di)).Singleton(); // Set unique lifecycle for all AppEventHandler<> classes config.SetLifecycleForImplementationsOfGenericType( typeof(AppEventHandler <>), new UniquePerRequestLifecycle(), AssembliesWithBootstrapper.Value); }); }
public void Start(DependencyInjectionContainer dependencyInjectionContainer) { dependencyInjectionContainer.RegisterUiMetadata(typeof(Bootstrap).GetTypeInfo().Assembly); }
protected Register(DependencyInjectionContainer dependencyInjectionContainer) { this.dependencyInjectionContainer = dependencyInjectionContainer; }