示例#1
0
 public void Dispose()
 {
     if (LoggerSource != null)
     {
         Console.SetOut(StandardOut);
         Logger.Sources.Remove(LoggerSource);
         LoggerSource.Dispose();
         LoggerSource = null;
     }
 }
示例#2
0
        public PreloaderConsoleListener(bool redirectConsole)
        {
            StandardOut = Console.Out;

            if (redirectConsole)
            {
                LoggerSource = new PreloaderConsoleSource();

                Logger.Sources.Add(LoggerSource);
                Console.SetOut(LoggerSource);
            }
        }