public static IObjectContainer GetObjectContainer(AbstractConfiguration cfg) { IObjectContainer container = cfg.Get <IObjectContainer>(ObjectContainer_SettingsKey); if (container == null) { throw new InvalidOperationException(string.Format("No object container has been configured for dependency injection.")); } return(container); }
private static IMessageBus BuildMessageBus(AbstractConfiguration cfg) { ISubscriptionService subscriptionService = MessageBusConfigurationExtensions.GetSubscriptionService(cfg); IMessageSink messageSink = MessageBusConfigurationExtensions.GetMessageSink(cfg); IObjectContainer container = ObjectContainerConfigurationExtensions.GetObjectContainer(cfg); IRouteManager routeManager = container.Resolve <IRouteManager>(); Xyperico.Agres.MessageBus.Implementation.MessageBus bus = new Agres.MessageBus.Implementation.MessageBus(subscriptionService, routeManager, messageSink); container.RegisterInstance <IMessageBus>(bus); return(bus); }
public AbstractConfiguration(AbstractConfiguration src) { Settings = src.Settings; }
public BaseConfiguration(AbstractConfiguration cfg) : base(cfg) { }
private static MessageBusHost BuildMessageBusHost(AbstractConfiguration cfg) { MessageBusHost busHost = new MessageBusHost(MessageBusConfigurationExtensions.GetMessageSource(cfg), MessageBusConfigurationExtensions.GetDispatcher(cfg)); return(busHost); }