internal TypeBasedRouter Build(IRebusLoggerFactory rebusLoggerFactory)
        {
            var router = new TypeBasedRouter(rebusLoggerFactory);

            foreach (var action in _configurationActions)
            {
                action(router);
            }

            return(router);
        }
Esempio n. 2
0
        static void Configure(StandardConfigurer <IRouter> configurer)
        {
            var rebusRoutingConfigurationSection = GetRebusRoutingConfigurationSection();

            configurer.Register(c =>
            {
                var typeBasedRouter = new TypeBasedRouter();

                SetUpEndpointMappings(rebusRoutingConfigurationSection.MappingsCollection, (type, endpoint) => typeBasedRouter.Map(type, endpoint));

                return(typeBasedRouter);
            });
        }
        static void Configure(StandardConfigurer<IRouter> configurer)
        {
            var rebusRoutingConfigurationSection = GetRebusRoutingConfigurationSection();

            configurer.Register(c =>
            {
                var rebusLoggerFactory = c.Get<IRebusLoggerFactory>();
                var typeBasedRouter = new TypeBasedRouter(rebusLoggerFactory);

                SetUpEndpointMappings(rebusRoutingConfigurationSection.MappingsCollection, (type, endpoint) => typeBasedRouter.Map(type, endpoint));

                return typeBasedRouter;
            });
        }
Esempio n. 4
0
 protected override void SetUp()
 {
     _loggerFactory = new ListLoggerFactory(detailed: true, outputToConsole: true);
     _router = new TypeBasedRouter(_loggerFactory);
 }
Esempio n. 5
0
 protected override void SetUp()
 {
     _loggerFactory = new ListLoggerFactory(detailed: true, outputToConsole: true);
     _router        = new TypeBasedRouter(_loggerFactory);
 }