Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 59a13ea

Browse files
committed
fix console error color
1 parent a863fd1 commit 59a13ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,16 @@ private async Task WriteToConsole(string message, ConsoleColor color)
283283
{
284284
await @lock.WaitAsync();
285285

286+
ConsoleColor existing = Console.ForegroundColor;
287+
286288
try
287289
{
290+
Console.ForegroundColor = color;
288291
Console.WriteLine(message);
289292
}
290293
finally
291294
{
295+
Console.ForegroundColor = existing;
292296
@lock.Release();
293297
}
294298

0 commit comments

Comments
 (0)