Beispiel #1
0
 public static void Routing(StandardConfigurer <IRouter> configurer)
 {
     configurer.TypeBased()
     .Map <DoStuffInTheBackground>("backend1");
 }
Beispiel #2
0
        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);
            }
        }