コード例 #1
0
        public void CanGetRouteWhenTypeHasBeenMapped()
        {
            _router.Map <string>("some_endpoint");

            var address = GetDestinationForBody("STRING BODY");

            Assert.That(address, Is.EqualTo("some_endpoint"));
        }
コード例 #2
0
        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;
            });
        }
コード例 #3
0
        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);
            });
        }