3
3
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4
4
//
5
5
6
+ using Microsoft . PowerShell . EditorServices . Utility ;
6
7
using System ;
7
8
using System . Management . Automation . Host ;
8
9
@@ -80,59 +81,35 @@ public override Size BufferSize
80
81
/// </summary>
81
82
public override Coordinates CursorPosition
82
83
{
83
- get
84
- {
85
- throw new System . NotImplementedException ( ) ;
86
- }
87
- set
88
- {
89
- throw new System . NotImplementedException ( ) ;
90
- }
84
+ get ;
85
+ set ;
91
86
}
92
87
93
88
/// <summary>
94
89
/// Gets or sets the size of the cursor in the console buffer.
95
90
/// </summary>
96
91
public override int CursorSize
97
92
{
98
- get
99
- {
100
- throw new System . NotImplementedException ( ) ;
101
- }
102
- set
103
- {
104
- throw new System . NotImplementedException ( ) ;
105
- }
93
+ get ;
94
+ set ;
106
95
}
107
96
108
97
/// <summary>
109
98
/// Gets or sets the position of the console's window.
110
99
/// </summary>
111
100
public override Coordinates WindowPosition
112
101
{
113
- get
114
- {
115
- throw new System . NotImplementedException ( ) ;
116
- }
117
- set
118
- {
119
- throw new System . NotImplementedException ( ) ;
120
- }
102
+ get ;
103
+ set ;
121
104
}
122
105
123
106
/// <summary>
124
107
/// Gets or sets the size of the console's window.
125
108
/// </summary>
126
109
public override Size WindowSize
127
110
{
128
- get
129
- {
130
- throw new System . NotImplementedException ( ) ;
131
- }
132
- set
133
- {
134
- throw new System . NotImplementedException ( ) ;
135
- }
111
+ get ;
112
+ set ;
136
113
}
137
114
138
115
/// <summary>
@@ -149,23 +126,23 @@ public override string WindowTitle
149
126
/// </summary>
150
127
public override bool KeyAvailable
151
128
{
152
- get { throw new System . NotImplementedException ( ) ; }
129
+ get { return false ; }
153
130
}
154
131
155
132
/// <summary>
156
133
/// Gets the maximum physical size of the console window.
157
134
/// </summary>
158
135
public override Size MaxPhysicalWindowSize
159
136
{
160
- get { throw new System . NotImplementedException ( ) ; }
137
+ get { return new Size ( 80 , 20 ) ; }
161
138
}
162
139
163
140
/// <summary>
164
141
/// Gets the maximum size of the console window.
165
142
/// </summary>
166
143
public override Size MaxWindowSize
167
144
{
168
- get { throw new System . NotImplementedException ( ) ; }
145
+ get { return new Size ( 80 , 20 ) ; }
169
146
}
170
147
171
148
/// <summary>
@@ -175,6 +152,10 @@ public override Size MaxWindowSize
175
152
/// <returns>A KeyInfo struct with details about the current keypress.</returns>
176
153
public override KeyInfo ReadKey ( ReadKeyOptions options )
177
154
{
155
+ Logger . Write (
156
+ LogLevel . Warning ,
157
+ "PSHostRawUserInterface.ReadKey was called" ) ;
158
+
178
159
throw new System . NotImplementedException ( ) ;
179
160
}
180
161
@@ -183,7 +164,9 @@ public override KeyInfo ReadKey(ReadKeyOptions options)
183
164
/// </summary>
184
165
public override void FlushInputBuffer ( )
185
166
{
186
- throw new System . NotImplementedException ( ) ;
167
+ Logger . Write (
168
+ LogLevel . Warning ,
169
+ "PSHostRawUserInterface.FlushInputBuffer was called" ) ;
187
170
}
188
171
189
172
/// <summary>
@@ -193,6 +176,10 @@ public override void FlushInputBuffer()
193
176
/// <returns>A BufferCell array with the requested buffer contents.</returns>
194
177
public override BufferCell [ , ] GetBufferContents ( Rectangle rectangle )
195
178
{
179
+ Logger . Write (
180
+ LogLevel . Warning ,
181
+ "PSHostRawUserInterface.GetBufferContents was called" ) ;
182
+
196
183
throw new System . NotImplementedException ( ) ;
197
184
}
198
185
@@ -209,7 +196,9 @@ public override void ScrollBufferContents(
209
196
Rectangle clip ,
210
197
BufferCell fill )
211
198
{
212
- throw new System . NotImplementedException ( ) ;
199
+ Logger . Write (
200
+ LogLevel . Warning ,
201
+ "PSHostRawUserInterface.ScrollBufferContents was called" ) ;
213
202
}
214
203
215
204
/// <summary>
@@ -221,7 +210,9 @@ public override void SetBufferContents(
221
210
Rectangle rectangle ,
222
211
BufferCell fill )
223
212
{
224
- throw new System . NotImplementedException ( ) ;
213
+ Logger . Write (
214
+ LogLevel . Warning ,
215
+ "PSHostRawUserInterface.SetBufferContents was called" ) ;
225
216
}
226
217
227
218
/// <summary>
@@ -233,7 +224,9 @@ public override void SetBufferContents(
233
224
Coordinates origin ,
234
225
BufferCell [ , ] contents )
235
226
{
236
- throw new System . NotImplementedException ( ) ;
227
+ Logger . Write (
228
+ LogLevel . Warning ,
229
+ "PSHostRawUserInterface.SetBufferContents was called" ) ;
237
230
}
238
231
239
232
#endregion
0 commit comments