public void Dispose() { if (LoggerSource != null) { Console.SetOut(StandardOut); Logger.Sources.Remove(LoggerSource); LoggerSource.Dispose(); LoggerSource = null; } }
public PreloaderConsoleListener(bool redirectConsole) { StandardOut = Console.Out; if (redirectConsole) { LoggerSource = new PreloaderConsoleSource(); Logger.Sources.Add(LoggerSource); Console.SetOut(LoggerSource); } }