File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,18 @@ public void WriteLine(string value)
236
236
} ) ;
237
237
}
238
238
239
+ /// <summary>
240
+ /// Writes the given text to the Output window pane.
241
+ /// </summary>
242
+ /// <param name="value">The text value to write.</param>
243
+ public void Write ( string value )
244
+ {
245
+ ThreadHelper . JoinableTaskFactory . Run ( async ( ) =>
246
+ {
247
+ await WriteAsync ( value ) ;
248
+ } ) ;
249
+ }
250
+
239
251
/// <summary>
240
252
/// Writes a new line to the Output window pane.
241
253
/// </summary>
@@ -249,6 +261,15 @@ public Task WriteLineAsync()
249
261
/// </summary>
250
262
/// <param name="value">The text value to write. May be an empty string, in which case a newline is written.</param>
251
263
public async Task WriteLineAsync ( string value )
264
+ {
265
+ await WriteAsync ( value + Environment . NewLine ) ;
266
+ }
267
+
268
+ /// <summary>
269
+ /// Writes the given text to the Output window pane.
270
+ /// </summary>
271
+ /// <param name="value">The text value to write.</param>
272
+ public async Task WriteAsync ( string value )
252
273
{
253
274
await ThreadHelper . JoinableTaskFactory . SwitchToMainThreadAsync ( ) ;
254
275
@@ -261,11 +282,11 @@ public async Task WriteLineAsync(string value)
261
282
262
283
if ( _pane is IVsOutputWindowPaneNoPump nopump )
263
284
{
264
- nopump . OutputStringNoPump ( value + Environment . NewLine ) ;
285
+ nopump . OutputStringNoPump ( value ) ;
265
286
}
266
287
else
267
288
{
268
- ErrorHandler . ThrowOnFailure ( _pane . OutputStringThreadSafe ( value + Environment . NewLine ) ) ;
289
+ ErrorHandler . ThrowOnFailure ( _pane . OutputStringThreadSafe ( value ) ) ;
269
290
}
270
291
}
271
292
You can’t perform that action at this time.
0 commit comments