()
| 780 | |
| 781 | static int consoleCreated = 0; |
| 782 | static void ensureConsole() |
| 783 | { |
| 784 | if (Environment.OSVersion.Platform != PlatformID.Win32NT) return; |
| 785 | |
| 786 | if (Interlocked.CompareExchange(ref consoleCreated, 1, 0) == 1) return; |
| 787 | |
| 788 | if (!NativeMethods.AttachConsole(-1)) { |
| 789 | NativeMethods.AllocConsole(); |
| 790 | } |
| 791 | |
| 792 | NativeMethods.GetStdHandle(StandardHandles.STD_ERROR_HANDLE); |
| 793 | NativeMethods.GetStdHandle(StandardHandles.STD_OUTPUT_HANDLE); |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | public class ProgressSource |
nothing calls this directly
no test coverage detected