public static void Routing(StandardConfigurer <IRouter> configurer) { configurer.TypeBased() .Map <DoStuffInTheBackground>("backend1"); }
private void MapAssemblyOf <T, TInterface>(StandardConfigurer <IRouter> configurer, string queueName) { typeBasedRouterConfigurationBuilder = typeBasedRouterConfigurationBuilder ?? configurer.TypeBased(); foreach (Type type in typeof(T).Assembly.GetTypes().Where(t => typeof(TInterface).IsAssignableFrom(t))) { typeBasedRouterConfigurationBuilder.Map(type, queueName); } }