Exemple #1
0
        public static void ConfigureCommands(this IServiceCollection services, Action <CommandRegistry> configure)
        {
            var registry = new CommandRegistry(services);

            configure(registry);
            services.AddSingleton(registry);
            services.AddTransient <CommandProcessor>();
        }
Exemple #2
0
 public CommandProcessor(IServiceScopeFactory serviceScopeFactory, CommandRegistry commandRegistry)
 {
     _serviceScopeFactory = serviceScopeFactory;
     _commandRegistry     = commandRegistry;
 }