| | |
| | | public class ConsoleInterceptor:TextWriter |
| | | { |
| | | #region [èªå®ä¹ç±»][20250702112833751][ConsoleInterceptor] |
| | | |
| | | private readonly TextWriter _originalOut; |
| | | |
| | | public ConsoleInterceptor() |
| | | { |
| | | _originalOut = Console.Out; |
| | | } |
| | | |
| | | public override Encoding Encoding => Encoding.UTF8; |
| | | |
| | | public override void WriteLine(string value = "") |
| | | { |
| | | string values = (string)AutoThread.InvokeMethod(AutoThread.Instance, "WriteLine", new object[] { value }); |
| | | //// å¯ä»¥éæ©ç»§ç»è¾åºå°åæ§å¶å° |
| | | if (!string.IsNullOrEmpty(values)) |
| | | _originalOut.WriteLine(values); |
| | | } |
| | | #endregion [èªå®ä¹ç±»][20250702112833751][ConsoleInterceptor] |
| | | } |
| | | } |