public void CanGetRouteWhenTypeHasBeenMapped() { _router.Map <string>("some_endpoint"); var address = GetDestinationForBody("STRING BODY"); Assert.That(address, Is.EqualTo("some_endpoint")); }
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; }); }
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); }); }