Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
PR Feedback
  • Loading branch information
safern committed May 27, 2020
commit 7b1e508f6568a0e1b7edac5716a602bd3a3f2124
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@
<Compile Include="$(BclSourcesRoot)\System\Environment.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Exception.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\GC.cs" />
<Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Internal.cs" />
<Compile Include="$(BclSourcesRoot)\System\IO\FileLoadException.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\IO\FileNotFoundException.CoreCLR.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ private static bool GetInvariantSwitchValue() =>
private static bool TryGetAppLocalIcuSwitchValue([NotNullWhen(true)] out string? value) =>
TryGetStringValue("System.Globalization.AppLocalIcu", "DOTNET_SYSTEM_GLOBALIZATION_APPLOCALICU", out value);

private static bool GetSwitchValue(string switchName, string envVariable)
{
if (!AppContext.TryGetSwitch(switchName, out bool ret))
{
string? switchValue = Environment.GetEnvironmentVariable(envVariable);
if (switchValue != null)
{
ret = bool.IsTrueStringIgnoreCase(switchValue) || switchValue.Equals("1");
}
}

return ret;
}

private static bool TryGetStringValue(string switchName, string envVariable, [NotNullWhen(true)] out string? value)
{
value = AppContext.GetData(switchName) as string;
if (string.IsNullOrEmpty(value))
{
value = Environment.GetEnvironmentVariable(envVariable);
if (string.IsNullOrEmpty(value))
{
return false;
}
}

return true;
}

private static void LoadAppLocalIcu(string icuSuffixAndVersion, bool suffixWithSeparator = false)
{
ReadOnlySpan<char> version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
<Compile Include="$(BclSourcesRoot)\System\WeakReference.T.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\__ComObject.cs" />
<Compile Include="$(BclSourcesRoot)\System\Internal.cs" />
<Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\Generic\ArraySortHelper.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\Generic\Comparer.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Collections\Generic\EqualityComparer.Mono.cs" />
Expand Down

This file was deleted.