Beispiel #1
0
        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);
        }
Beispiel #2
0
        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;
 }
Beispiel #4
0
 public BaseConfiguration(AbstractConfiguration cfg)
     : base(cfg)
 {
 }
Beispiel #5
0
        private static MessageBusHost BuildMessageBusHost(AbstractConfiguration cfg)
        {
            MessageBusHost busHost = new MessageBusHost(MessageBusConfigurationExtensions.GetMessageSource(cfg), MessageBusConfigurationExtensions.GetDispatcher(cfg));

            return(busHost);
        }