public static void ConfigureCommands(this IServiceCollection services, Action <CommandRegistry> configure) { var registry = new CommandRegistry(services); configure(registry); services.AddSingleton(registry); services.AddTransient <CommandProcessor>(); }
public CommandProcessor(IServiceScopeFactory serviceScopeFactory, CommandRegistry commandRegistry) { _serviceScopeFactory = serviceScopeFactory; _commandRegistry = commandRegistry; }