Use System.Environment.NewLine in host

This commit is contained in:
Andrew Schwartzmeyer 2015-12-22 12:18:51 -08:00
parent 7cd8b1f3ee
commit 489a951c5d
3 changed files with 5 additions and 5 deletions

View file

@ -200,7 +200,7 @@ namespace Microsoft.PowerShell.Linux.Host
if (this.myHost.IsRunspacePushed)
{
returnVal = string.Format("\n[{0}] PSL> ", this.myRunSpace.ConnectionInfo.ComputerName);
returnVal = string.Format($"{System.Environment.NewLine}[{this.myRunSpace.ConnectionInfo.ComputerName}] PSL> ");
return returnVal;
}

View file

@ -520,7 +520,7 @@ namespace Microsoft.PowerShell.Linux.Host
/// <returns>A newline character.</returns>
private string OnEnter()
{
Console.Out.Write("\n");
Console.Out.WriteLine();
return this.buffer.ToString();
}

View file

@ -47,7 +47,7 @@ namespace Microsoft.PowerShell.Linux.Host
this.Write(
ConsoleColor.White,
ConsoleColor.Black,
caption + "\n" + message + " ");
caption + System.Environment.NewLine + message + " ");
Dictionary<string, PSObject> results =
new Dictionary<string, PSObject>();
foreach (FieldDescription fd in descriptions)
@ -89,7 +89,7 @@ namespace Microsoft.PowerShell.Linux.Host
this.WriteLine(
ConsoleColor.Blue,
ConsoleColor.Black,
caption + "\n" + message + "\n");
caption + System.Environment.NewLine + message + System.Environment.NewLine);
// Convert the choice collection into something that is
// easier to work with. See the BuildHotkeysAndPlainLabels
@ -163,7 +163,7 @@ namespace Microsoft.PowerShell.Linux.Host
this.WriteLine(
ConsoleColor.Blue,
ConsoleColor.Black,
caption + "\n" + message + "\n");
caption + System.Environment.NewLine + message + System.Environment.NewLine);
// Convert the choice collection into something that is
// easier to work with. See the BuildHotkeysAndPlainLabels