Skip to content

Commit

Permalink
Enable Console.OpenStandard* to be trimmed in default Blazor wasm app (
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub authored Feb 5, 2021
1 parent 66a5cd7 commit f708c85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libraries/System.Console/src/System/Console.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static TextWriter EnsureInitialized()
{
if (s_out == null)
{
Volatile.Write(ref s_out, CreateOutputWriter(OpenStandardOutput()));
Volatile.Write(ref s_out, CreateOutputWriter(ConsolePal.OpenStandardOutput()));
}
return s_out;
}
Expand All @@ -207,7 +207,7 @@ static TextWriter EnsureInitialized()
{
if (s_error == null)
{
Volatile.Write(ref s_error, CreateOutputWriter(OpenStandardError()));
Volatile.Write(ref s_error, CreateOutputWriter(ConsolePal.OpenStandardError()));
}
return s_error;
}
Expand Down Expand Up @@ -536,7 +536,7 @@ public static Stream OpenStandardInput(int bufferSize)
{
throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedNonNegNum);
}
return OpenStandardInput();
return ConsolePal.OpenStandardInput();
}

public static Stream OpenStandardOutput()
Expand All @@ -551,7 +551,7 @@ public static Stream OpenStandardOutput(int bufferSize)
{
throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedNonNegNum);
}
return OpenStandardOutput();
return ConsolePal.OpenStandardOutput();
}

public static Stream OpenStandardError()
Expand All @@ -566,7 +566,7 @@ public static Stream OpenStandardError(int bufferSize)
{
throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedNonNegNum);
}
return OpenStandardError();
return ConsolePal.OpenStandardError();
}

[UnsupportedOSPlatform("browser")]
Expand Down

0 comments on commit f708c85

Please sign in to comment.