コード例 #1
0
ファイル: Extensions.cs プロジェクト: ashrafzs/teamr
        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);
            });
        }
コード例 #2
0
 public void Start(DependencyInjectionContainer dependencyInjectionContainer)
 {
     dependencyInjectionContainer.RegisterUiMetadata(typeof(Bootstrap).GetTypeInfo().Assembly);
 }
コード例 #3
0
 protected Register(DependencyInjectionContainer dependencyInjectionContainer)
 {
     this.dependencyInjectionContainer = dependencyInjectionContainer;
 }