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