internal TypeBasedRouter Build(IRebusLoggerFactory rebusLoggerFactory) { var router = new TypeBasedRouter(rebusLoggerFactory); foreach (var action in _configurationActions) { action(router); } return(router); }
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; }); }
protected override void SetUp() { _loggerFactory = new ListLoggerFactory(detailed: true, outputToConsole: true); _router = new TypeBasedRouter(_loggerFactory); }