Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@@ -32,6 +32,13 @@ namespace System
{
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.MemberDescriptorEqualsReturnsFalseIfEquivalentName, true);
}
if (version <= 40602)
{
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.DontEnableSystemDefaultTlsVersionsName, true);
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.DontEnableTlsAlertsName, true);
}
break;
}
case "WindowsPhone":
@@ -39,7 +46,9 @@ namespace System
{
if (version <= 80100)
{
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.DontEnableSchUseStrongCryptoName, true);
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.DontEnableSchUseStrongCryptoName, true);
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.DontEnableSystemDefaultTlsVersionsName, true);
LocalAppContext.DefineSwitchDefault(LocalAppContextSwitches.DontEnableTlsAlertsName, true);
}
break;
}

View File

@@ -61,6 +61,31 @@ namespace System
return LocalAppContext.GetCachedSwitchValue(DontEnableSchSendAuxRecordName, ref _dontEnableSchSendAuxRecord);
}
}
private static int _dontEnableSystemSystemDefaultTlsVersions;
internal const string DontEnableSystemDefaultTlsVersionsName = @"Switch.System.Net.DontEnableSystemDefaultTlsVersions";
public static bool DontEnableSystemDefaultTlsVersions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return LocalAppContext.GetCachedSwitchValue(DontEnableSystemDefaultTlsVersionsName, ref _dontEnableSystemSystemDefaultTlsVersions);
}
}
private static int _dontEnableTlsAlerts;
internal const string DontEnableTlsAlertsName = @"Switch.System.Net.DontEnableTlsAlerts";
public static bool DontEnableTlsAlerts
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return LocalAppContext.GetCachedSwitchValue(DontEnableTlsAlertsName, ref _dontEnableTlsAlerts);
}
}
#endregion
}
}

View File

@@ -7,7 +7,7 @@
**
** Class: SerialStream
**
** Purpose: Class for enabling low-level [....] and async control over a serial
** Purpose: Class for enabling low-level sync and async control over a serial
** : communications resource.
**
** Date: August, 2002
@@ -809,7 +809,8 @@ namespace System.IO.Ports
// the SerialPort. A customer also reported seeing ERROR_BAD_COMMAND here.
// Do not throw an exception on the finalizer thread - that's just rude,
// since apps can't catch it and we may tear down the app.
if ((hr == NativeMethods.ERROR_ACCESS_DENIED || hr == NativeMethods.ERROR_BAD_COMMAND) && !disposing) {
const int ERROR_DEVICE_REMOVED = 1617;
if ((hr == NativeMethods.ERROR_ACCESS_DENIED || hr == NativeMethods.ERROR_BAD_COMMAND || hr == ERROR_DEVICE_REMOVED) && !disposing) {
skipSPAccess = true;
}
else {
@@ -1736,8 +1737,9 @@ namespace System.IO.Ports
{
int hr = Marshal.GetLastWin32Error();
// When a device is disconnected unexpectedly from a serial port, there appear to be
// at least two error codes Windows or drivers may return.
if (hr == NativeMethods.ERROR_ACCESS_DENIED || hr == NativeMethods.ERROR_BAD_COMMAND) {
// at least three error codes Windows or drivers may return.
const int ERROR_DEVICE_REMOVED = 1617;
if (hr == NativeMethods.ERROR_ACCESS_DENIED || hr == NativeMethods.ERROR_BAD_COMMAND || hr == ERROR_DEVICE_REMOVED) {
doCleanup = true;
break;
}

View File

@@ -227,7 +227,7 @@ namespace System.Media {
/// <include file='doc\SoundPlayer.uex' path='docs/doc[@for="SoundPlayer.Load"]/*' />
public void Load() {
// if we have a file there is nothing to load - we just pass the file to the PlaySound function
// if we have a stream, then we start loading the stream [....]
// if we have a stream, then we start loading the stream sync
//
if (uri != null && uri.IsFile){
Debug.Assert(stream == null, "we can't have a stream and a path at the same time");

View File

@@ -1 +1 @@
ba8dac3666946905648e8661c4cd6399e5c8f415
d252dced5a5790f624177f3381a78119434e7cb7

View File

@@ -7,7 +7,7 @@
//
// ConcurrentBag.cs
//
// <OWNER>[....]</OWNER>
// <OWNER>Microsoft</OWNER>
//
//
//An unordered collection that allows duplicates and that provides add and get operations.

View File

@@ -7,7 +7,7 @@
//
// Barrier.cs
//
// <OWNER>[....]</OWNER>
// <OWNER>Microsoft</OWNER>
//
// A barrier allows multiple tasks to cooperatively work on some algorithm in parallel.
// A group of tasks cooperate by moving through a series of phases, where each in the group signals it has arrived at

View File

@@ -10,7 +10,7 @@
// an attached property by setting it on the static accessor
// for the attachable property).
//
// Created: 04/28/2005 [....]
// Created: 04/28/2005 Microsoft
//
//------------------------------------------------------------------------