示例#1
0
        private Task ShowStepStatus(UpgradeStep step)
        {
            Console.ForegroundColor = ConsoleColor.Cyan;
            _io.Output.WriteLine(new string('-', step.Title.Length));
            _io.Output.WriteLine($"{step.Title}");
            _io.Output.WriteLine(new string('-', step.Title.Length));
            Console.ResetColor();
            _io.Output.WriteLine(ConsoleHelpers.WrapString(step.Description, Console.WindowWidth));
            WriteWithColor("  Status              ", ConsoleColor.DarkYellow);
            _io.Output.Write(": ");
            _io.Output.WriteLine($"{step.Status}");
            WriteWithColor("  Risk to break build ", ConsoleColor.DarkYellow);
            _io.Output.Write(": ");
            _io.Output.WriteLine($"{step.Risk}");
            WriteWithColor("  Details             ", ConsoleColor.DarkYellow);
            _io.Output.Write(": ");
            _io.Output.WriteLine(ConsoleHelpers.WrapString($"{step.StatusDetails}", Console.WindowWidth, "  Details             : ".Length));

            return(Task.CompletedTask);
        }