BeiDream.Core.Events.Bus.EventBus.EventBusInstaller.Install C# (CSharp) Метод

Install() публичный Метод

public Install ( IWindsorContainer container, IConfigurationStore store ) : void
container IWindsorContainer
store IConfigurationStore
Результат void
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            if (_eventBusConfiguration.UseDefaultEventBus)
            {
                container.Register(
                    Component.For<IEventBus>().UsingFactoryMethod(() => EventBus.Default).LifestyleSingleton()
                    );
            }
            else
            {
                container.Register(
                    Component.For<IEventBus>().ImplementedBy<EventBus>().LifestyleSingleton()
                    );
            }

            _eventBus = container.Resolve<IEventBus>();

            container.Kernel.ComponentRegistered += Kernel_ComponentRegistered;
        }