2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
4
using System ;
5
+ using System . IO ;
6
+ using Microsoft . Diagnostics . Tools . Common ;
5
7
6
- namespace Microsoft . Diagnostics . Tools . Counters . Exporters
8
+ namespace Microsoft . Diagnostics . Tools . Common
7
9
{
8
10
/// <summary>
9
11
/// The default implementation of IConsole maps everything to System.Console. In the future
@@ -27,10 +29,24 @@ public DefaultConsole(bool useAnsi)
27
29
public bool CursorVisible { get => Console . CursorVisible ; set { Console . CursorVisible = value ; } }
28
30
#pragma warning restore CA1416
29
31
32
+ public int CursorLeft => Console . CursorLeft ;
33
+
30
34
public int CursorTop => Console . CursorTop ;
31
35
32
36
public int BufferWidth => Console . BufferWidth ;
33
37
38
+ public int BufferHeight => Console . BufferHeight ;
39
+
40
+ public bool IsOutputRedirected => Console . IsOutputRedirected ;
41
+
42
+ public bool IsInputRedirected => Console . IsInputRedirected ;
43
+
44
+ public bool KeyAvailable => Console . KeyAvailable ;
45
+
46
+ public TextWriter Out => Console . Out ;
47
+
48
+ public TextWriter Error => Console . Error ;
49
+
34
50
public void Clear ( )
35
51
{
36
52
if ( _useAnsi )
@@ -57,5 +73,7 @@ public void SetCursorPosition(int col, int row)
57
73
public void Write ( string text ) => Console . Write ( text ) ;
58
74
public void WriteLine ( string text ) => Console . WriteLine ( text ) ;
59
75
public void WriteLine ( ) => Console . WriteLine ( ) ;
76
+ public ConsoleKeyInfo ReadKey ( ) => Console . ReadKey ( ) ;
77
+ public ConsoleKeyInfo ReadKey ( bool intercept ) => Console . ReadKey ( intercept ) ;
60
78
}
61
79
}
0 commit comments