diff --git a/src/toolkit/Community.VisualStudio.Toolkit.Shared/Helpers/OutputWindowPane.cs b/src/toolkit/Community.VisualStudio.Toolkit.Shared/Helpers/OutputWindowPane.cs
index 4a24c2f..498518b 100644
--- a/src/toolkit/Community.VisualStudio.Toolkit.Shared/Helpers/OutputWindowPane.cs
+++ b/src/toolkit/Community.VisualStudio.Toolkit.Shared/Helpers/OutputWindowPane.cs
@@ -236,6 +236,18 @@ public void WriteLine(string value)
});
}
+ ///
+ /// Writes the given text to the Output window pane.
+ ///
+ /// The text value to write.
+ public void Write(string value)
+ {
+ ThreadHelper.JoinableTaskFactory.Run(async () =>
+ {
+ await WriteAsync(value);
+ });
+ }
+
///
/// Writes a new line to the Output window pane.
///
@@ -249,6 +261,15 @@ public Task WriteLineAsync()
///
/// The text value to write. May be an empty string, in which case a newline is written.
public async Task WriteLineAsync(string value)
+ {
+ await WriteAsync(value + Environment.NewLine);
+ }
+
+ ///
+ /// Writes the given text to the Output window pane.
+ ///
+ /// The text value to write.
+ public async Task WriteAsync(string value)
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
@@ -261,11 +282,11 @@ public async Task WriteLineAsync(string value)
if (_pane is IVsOutputWindowPaneNoPump nopump)
{
- nopump.OutputStringNoPump(value + Environment.NewLine);
+ nopump.OutputStringNoPump(value);
}
else
{
- ErrorHandler.ThrowOnFailure(_pane.OutputStringThreadSafe(value + Environment.NewLine));
+ ErrorHandler.ThrowOnFailure(_pane.OutputStringThreadSafe(value));
}
}