예제 #1
0
        /// <summary>
        /// Runs the wizard in a console
        /// </summary>
        public async Task RunInConsole(ConsoleShell shell, bool reportErrorsToConsole = false)
        {
            foreach (var item in Steps)
            {
                CurrentStep = item; // In case any event handlers are listening

                ConsoleWriteLine(CurrentStepDisplayName);
                var command = CurrentStep.GetConsoleCommand();
                if (command != null)
                {
                    await shell.RunCommand(command, Enumerable.Empty <string>(), reportErrorsToConsole);
                }
                else
                {
                    ConsoleWriteLine(Properties.Resources.Wizard_Console_NullCommand);
                }
                ConsoleWriteLine("");
            }
        }