Exemplo n.º 1
0
        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);
            });
        }
Exemplo n.º 2
0
 public void Start(DependencyInjectionContainer dependencyInjectionContainer)
 {
     dependencyInjectionContainer.RegisterUiMetadata(typeof(Bootstrap).GetTypeInfo().Assembly);
 }
Exemplo n.º 3
0
 protected Register(DependencyInjectionContainer dependencyInjectionContainer)
 {
     this.dependencyInjectionContainer = dependencyInjectionContainer;
 }