Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@@ -23,6 +23,7 @@ namespace System.IO {
using System.Globalization;
using System.Diagnostics.Contracts;
using System.Security;
using System.Buffers.Binary;
[System.Runtime.InteropServices.ComVisible(true)]
public class BinaryReader : IDisposable
@@ -243,6 +244,12 @@ namespace System.IO {
try {
int[] ints = new int[4];
Buffer.BlockCopy(m_buffer, 0, ints, 0, 16);
if (!BitConverter.IsLittleEndian) {
// We need to reverse the ints on BE
for (int i = 0; i < 4; i++) {
ints[i] = BinaryPrimitives.ReverseEndianness(ints[i]);
}
}
return new decimal(ints);
}
catch (ArgumentException e) {

View File

@@ -358,7 +358,7 @@ namespace System.Resources {
_store.BaseStream.Seek(_nameSectionOffset + GetNamePosition(index), SeekOrigin.Begin);
lastReadString = _store.ReadString();
}
BCLDebug.Log("RESMGRFILEFORMAT", LogLevel.Status, "FindPosForResource for ", name, " failed. i: ", index, " lo: ", lo, " hi: ", hi, " last read string: \"", lastReadString, '\'');
BCLDebug.Log("RESMGRFILEFORMAT", BCLDebugLogLevel.Status, "FindPosForResource for ", name, " failed. i: ", index, " lo: ", lo, " hi: ", hi, " last read string: \"", lastReadString, '\'');
#endif
return -1;
}
@@ -909,7 +909,7 @@ namespace System.Resources {
throw new BadImageFormatException(Environment.GetResourceString("BadImageFormat_ResourcesHeaderCorrupted"));
}
if (resMgrHeaderVersion > 1) {
BCLDebug.Log("RESMGRFILEFORMAT", LogLevel.Status, "ReadResources: Unexpected ResMgr header version: {0} Skipping ahead {1} bytes.", resMgrHeaderVersion, numBytesToSkip);
BCLDebug.Log("RESMGRFILEFORMAT", BCLDebugLogLevel.Status, "ReadResources: Unexpected ResMgr header version: {0} Skipping ahead {1} bytes.", resMgrHeaderVersion, numBytesToSkip);
_store.BaseStream.Seek(numBytesToSkip, SeekOrigin.Current);
}
else {

View File

@@ -85,7 +85,7 @@ namespace System.Threading
#if MONO
public const uint tpQuantum = 30U;
public static int processorCount => Environment.ProcessorCount;
public static int processorCount = Environment.ProcessorCount;
public static bool tpHosted => ThreadPool.IsThreadPoolHosted();