private static Task <int> CreateRootCommand(CommandContext commandContext, ExecutionDelegate next) { var config = commandContext.AppConfig.Services.GetOrThrow <Config>(); commandContext.RootCommand = ClassCommandDef.CreateRootCommand(config.RootCommandType, commandContext); return(next(commandContext)); }
private static Task <int> CreateRootCommand( CommandContext commandContext, ExecutionDelegate next, Type rootCommandType) { commandContext.RootCommand = ClassCommandDef.CreateRootCommand(rootCommandType, commandContext); return(next(commandContext)); }