Resolve CA1303

This commit is contained in:
JustArchi 2021-05-07 00:06:03 +02:00
parent 0e9b956ae9
commit 5745e00bda
2 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,6 @@ dotnet_diagnostic.ca1028.severity = silent
dotnet_diagnostic.ca1031.severity = silent
# TODO - one at a time
dotnet_diagnostic.ca1303.severity = silent
dotnet_diagnostic.ca1307.severity = silent
dotnet_diagnostic.ca1308.severity = silent
dotnet_diagnostic.ca1508.severity = silent

View file

@ -45,6 +45,8 @@ namespace ArchiSteamFarm.NLog {
private static readonly ConcurrentHashSet<LoggingRule> ConsoleLoggingRules = new();
private static readonly SemaphoreSlim ConsoleSemaphore = new(1, 1);
private static string Backspace => "\b \b";
private static bool IsUsingCustomConfiguration;
private static bool IsWaitingForUserInput;
@ -279,8 +281,7 @@ namespace ArchiSteamFarm.NLog {
Console.Write(' ');
Console.SetCursorPosition(Console.BufferWidth - 1, Console.CursorTop - 1);
} else {
// There are two \b characters here
Console.Write(@" ");
Console.Write(Backspace);
}
}
}