Exemple #1
0
 private void RegisterAssemblyCommandDestinationMappings(CommandBusConfig commandBusConfig, IEnumerable <Type> commandTypes)
 {
     foreach (var mapping in GetCommandEndpointMappingsForAssembly(commandBusConfig.CommandEndpointMappings, commandTypes))
     {
         foreach (var commandType in commandTypes)
         {
             if (CommandTypeIsInCommandAssembly(commandType, mapping.Commands))
             {
                 commandTypeToDestinationLookup.Add(commandType, mapping.Endpoint);
             }
         }
     }
 }
Exemple #2
0
 private void RegisterCommandDestinationMappings(CommandBusConfig commandBusConfig, IEnumerable <Type> commandTypes)
 {
     foreach (var mapping in GetCommandEndpointMappingsForCommand(commandBusConfig.CommandEndpointMappings, commandTypes))
     {
         foreach (var commandType in commandTypes)
         {
             if (CommandTypeIsCommand(commandType, mapping.Commands))
             {
                 if (commandTypeToDestinationLookup.ContainsKey(commandType))
                 {
                     commandTypeToDestinationLookup[commandType] = mapping.Endpoint;
                 }
                 else
                 {
                     commandTypeToDestinationLookup.Add(commandType, mapping.Endpoint);
                 }
             }
         }
     }
 }