Skip to content

Commit 511d89d

Browse files
kdk1116Nemanja Rogic
andauthored
Wait for a user's input before showing design patterns menu
* Adding ReadLine to allow user to read design pattern output * suggested changes to add private method to notify user * white space for readability * Reorder methods Co-authored-by: Nemanja Rogic <[email protected]>
1 parent 7ae7dce commit 511d89d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/DesignPatternsLibrary/Program.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ private static void Main(string[] args)
1919
}
2020

2121
Executors[choiceKey].Execute();
22+
WaitForContinuationSignal();
2223
}
2324

2425
Console.WriteLine("Thank you!");
@@ -69,4 +70,12 @@ private static bool IsChoiceUnsupported(string? choice, out int choiceKey)
6970
choiceKey = key;
7071
return false;
7172
}
73+
74+
private static void WaitForContinuationSignal()
75+
{
76+
Console.ForegroundColor = ConsoleColor.DarkGreen;
77+
Console.WriteLine("\n\nExecution results can be found above. Press ENTER to continue.");
78+
Console.ReadLine();
79+
Console.ResetColor();
80+
}
7281
}

0 commit comments

Comments
 (0)