public void AddExecuteActivity(IServiceCollectionBusConfigurator serviceCollectionBusConfigurator) { foreach (var commandType in _types) { Type commandActivityType = typeof(CommandActivity <>).MakeGenericType(commandType); serviceCollectionBusConfigurator.AddExecuteActivity(commandActivityType, null); } }