Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@@ -76,11 +76,11 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
[assembly: InternalsVisibleTo ("System.Core, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
[assembly: InternalsVisibleTo ("System.Numerics, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo ("System.Runtime.InteropServices.RuntimeInformation, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
#if MONOTOUCH
#if MONOTOUCH_TV
[assembly: InternalsVisibleTo ("Xamarin.TVOS, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]

View File

@@ -27,7 +27,8 @@ endif
RESOURCE_STRINGS = ../referencesource/mscorlib/mscorlib.txt
RESX_RESOURCE_STRING = \
../../../external/corert/src/System.Private.CoreLib/src/Resources/Strings.resx
../../../external/corert/src/System.Private.CoreLib/src/Resources/Strings.resx \
../../../external/corefx/src/System.Collections.Concurrent/src/Resources/Strings.resx
LIBRARY_COMPILE = $(BOOT_COMPILE)
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)

View File

@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if WIN_PLATFORM
#if WIN_PLATFORM || XAMMAC_4_5
using System;
using System.Text;

View File

@@ -55,6 +55,10 @@ namespace Microsoft.Win32
{
}
public void Close ()
{
}
public RegistryKey CreateSubKey (string subkey)
{
throw new PlatformNotSupportedException ();
@@ -70,6 +74,26 @@ namespace Microsoft.Win32
throw new PlatformNotSupportedException ();
}
public RegistryKey CreateSubKey (string subkey, RegistryKeyPermissionCheck permissionCheck)
{
throw new PlatformNotSupportedException ();
}
public RegistryKey CreateSubKey (string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
{
throw new PlatformNotSupportedException ();
}
public RegistryKey CreateSubKey (string subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
{
throw new PlatformNotSupportedException ();
}
public RegistryKey CreateSubKey (string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity registrySecurity)
{
throw new PlatformNotSupportedException ();
}
public void DeleteSubKey (string subkey)
{
}
@@ -128,6 +152,16 @@ namespace Microsoft.Win32
throw new PlatformNotSupportedException ();
}
public RegistrySecurity GetAccessControl ()
{
throw new PlatformNotSupportedException ();
}
public RegistrySecurity GetAccessControl (AccessControlSections includeSections)
{
throw new PlatformNotSupportedException ();
}
public RegistryValueKind GetValueKind (string name)
{
throw new PlatformNotSupportedException ();
@@ -158,6 +192,31 @@ namespace Microsoft.Win32
throw new PlatformNotSupportedException ();
}
public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck)
{
throw new PlatformNotSupportedException ();
}
public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
{
throw new PlatformNotSupportedException ();
}
public static RegistryKey OpenRemoteBaseKey (RegistryHive hKey, string machineName)
{
throw new PlatformNotSupportedException ();
}
public static RegistryKey OpenRemoteBaseKey (RegistryHive hKey, string machineName, RegistryView view)
{
throw new PlatformNotSupportedException ();
}
public void SetAccessControl (RegistrySecurity registrySecurity)
{
throw new PlatformNotSupportedException ();
}
public void SetValue (string name, object value)
{
}
@@ -209,9 +268,11 @@ namespace Microsoft.Win32
static RegistryKey ()
{
#if !XAMMAC_4_5
if (Path.DirectorySeparatorChar == '\\')
RegistryApi = new Win32RegistryApi ();
else
#endif
RegistryApi = new UnixRegistryApi ();
}

View File

@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if WIN_PLATFORM
namespace Microsoft.Win32
{
public enum RegistryKeyPermissionCheck
@@ -37,4 +36,3 @@ namespace Microsoft.Win32
ReadWriteSubTree = 2,
}
}
#endif

View File

@@ -37,7 +37,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if WIN_PLATFORM
#if WIN_PLATFORM || XAMMAC_4_5
using System;
using System.Collections;

View File

@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if WIN_PLATFORM
#if WIN_PLATFORM || XAMMAC_4_5
using System;
using System.Runtime.InteropServices;

View File

@@ -7,7 +7,20 @@ namespace Mono {
internal static string PtrToUtf8String (IntPtr ptr)
{
unsafe {
return new String ((sbyte*)ptr);
if (ptr == IntPtr.Zero)
return string.Empty;
byte* bytes = (byte*)ptr;
int length = 0;
try {
while (bytes++ [0] != 0)
length++;
} catch (NullReferenceException) {
throw new ArgumentOutOfRangeException ("ptr", "Value does not refer to a valid string.");
}
return new String ((sbyte*)ptr, 0, length, System.Text.Encoding.UTF8);
}
}

View File

@@ -794,6 +794,13 @@ namespace System
}
}
public override bool IsSZArray {
get {
// TODO: intrinsic
return IsArray && ReferenceEquals (this, GetElementType ().MakeArrayType ());
}
}
internal override bool IsUserType {
get {
return false;

View File

@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NETSTANDARD
namespace System.Diagnostics.Tracing
{
public class EventCounter
@@ -41,5 +39,3 @@ namespace System.Diagnostics.Tracing
}
}
}
#endif

View File

@@ -271,14 +271,12 @@ namespace System.Diagnostics.Tracing
{
}
#if NETSTANDARD
[MonoTODO]
public event EventHandler<EventCommandEventArgs> EventCommandExecuted
{
add { throw new NotImplementedException (); }
remove { throw new NotImplementedException (); }
}
#endif
[MonoTODO]
public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest)

View File

@@ -22,7 +22,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME || IOS_REFLECTION
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
@@ -35,5 +34,3 @@ namespace System.Reflection.Emit {
WindowApplication = 3
}
}
#endif

View File

@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NETSTANDARD
namespace System.Reflection.Metadata
{
public static class AssemblyExtensions
@@ -42,5 +40,3 @@ namespace System.Reflection.Metadata
}
}
}
#endif

View File

@@ -184,5 +184,11 @@ namespace System.Runtime.CompilerServices
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void RunModuleConstructor (IntPtr module);
// This is implemented as a JIT intrinsic
public static bool IsReferenceOrContainsReferences<T>()
{
return !typeof (T).IsValueType || RuntimeTypeHandle.HasReferences ((typeof (T) as RuntimeType));
}
}
}

View File

@@ -1,110 +0,0 @@
//
// AssemblyLoadContext.cs
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NETSTANDARD
namespace System.Runtime.Loader
{
//
// System.Runtime.Loader netstandard typeforwarders dependency
//
public abstract class AssemblyLoadContext
{
protected AssemblyLoadContext ()
{
}
public static System.Runtime.Loader.AssemblyLoadContext Default {
get {
throw new NotImplementedException ();
}
}
public static System.Reflection.AssemblyName GetAssemblyName (string assemblyPath)
{
throw new NotImplementedException ();
}
public static AssemblyLoadContext GetLoadContext (System.Reflection.Assembly assembly)
{
throw new NotImplementedException ();
}
protected abstract System.Reflection.Assembly Load (System.Reflection.AssemblyName assemblyName);
public System.Reflection.Assembly LoadFromAssemblyName(System.Reflection.AssemblyName assemblyName)
{
throw new NotImplementedException ();
}
public System.Reflection.Assembly LoadFromAssemblyPath (string assemblyPath)
{
throw new NotImplementedException ();
}
public System.Reflection.Assembly LoadFromNativeImagePath (string nativeImagePath, string assemblyPath)
{
throw new NotImplementedException ();
}
public System.Reflection.Assembly LoadFromStream (System.IO.Stream assembly)
{
throw new NotImplementedException ();
}
public System.Reflection.Assembly LoadFromStream (System.IO.Stream assembly, System.IO.Stream assemblySymbols)
{
throw new NotImplementedException ();
}
protected IntPtr LoadUnmanagedDllFromPath (string unmanagedDllPath)
{
throw new NotImplementedException ();
}
protected virtual IntPtr LoadUnmanagedDll (string unmanagedDllName)
{
throw new NotImplementedException ();
}
public void SetProfileOptimizationRoot (string directoryPath)
{
}
public void StartProfileOptimization (string profile)
{
}
#pragma warning disable 67
public event Func<AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly> Resolving;
public event Action<AssemblyLoadContext> Unloading;
#pragma warning restore
}
}
#endif

View File

@@ -1,48 +0,0 @@
//
// System.Security.Cryptography.X509Certificates.X509ContentType.cs
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Runtime.InteropServices;
namespace System.Security.Cryptography.X509Certificates {
// Note: Definitions are useful for 1.0 and 1.1 so we declare them internal
[ComVisible (true)]
public
enum X509ContentType {
Unknown,
Cert,
// not supported by Silverlight 2.0 (MOBILE)
SerializedCert,
Pfx,
SerializedStore,
Pkcs7,
Authenticode,
Pkcs12 = Pfx
}
}

View File

@@ -1,46 +0,0 @@
//
// System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.cs
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Runtime.InteropServices;
namespace System.Security.Cryptography.X509Certificates {
[Flags]
[Serializable]
[ComVisible (true)]
public enum X509KeyStorageFlags {
DefaultKeySet = 0,
// not supported by Silverlight 2.0 (MOBILE)
UserKeySet = 1,
MachineKeySet = 2,
Exportable = 4,
UserProtected = 8,
PersistKeySet = 16
}
}

View File

@@ -94,7 +94,41 @@ namespace System.Security.Principal {
BuiltinPerformanceLoggingUsersSid,
BuiltinAuthorizationAccessSid,
WinBuiltinTerminalServerLicenseServersSid,
MaxDefined = WinBuiltinTerminalServerLicenseServersSid
MaxDefined = WinBuiltinTerminalServerLicenseServersSid,
WinBuiltinDCOMUsersSid,
WinBuiltinIUsersSid,
WinIUserSid,
WinBuiltinCryptoOperatorsSid,
WinUntrustedLabelSid,
WinLowLabelSid,
WinMediumLabelSid,
WinHighLabelSid,
WinSystemLabelSid,
WinWriteRestrictedCodeSid,
WinCreatorOwnerRightsSid,
WinCacheablePrincipalsGroupSid,
WinNonCacheablePrincipalsGroupSid,
WinEnterpriseReadonlyControllersSid,
WinAccountReadonlyControllersSid,
WinBuiltinEventLogReadersGroup,
WinNewEnterpriseReadonlyControllersSid,
WinBuiltinCertSvcDComAccessGroup,
WinMediumPlusLabelSid,
WinLocalLogonSid,
WinConsoleLogonSid,
WinThisOrganizationCertificateSid,
WinApplicationPackageAuthoritySid,
WinBuiltinAnyPackageSid,
WinCapabilityInternetClientSid,
WinCapabilityInternetClientServerSid,
WinCapabilityPrivateNetworkClientServerSid,
WinCapabilityPicturesLibrarySid,
WinCapabilityVideosLibrarySid,
WinCapabilityMusicLibrarySid,
WinCapabilityDocumentsLibrarySid,
WinCapabilitySharedUserCertificatesSid,
WinCapabilityEnterpriseAuthenticationSid,
WinCapabilityRemovableStorageSid
}
}

View File

@@ -51,9 +51,7 @@ namespace System.Threading {
// stores a thread handle
IntPtr handle;
IntPtr native_handle; // used only on Win32
/* Note this is an opaque object (an array), not a CultureInfo */
private object cached_culture_info;
IntPtr unused3;
/* accessed only from unmanaged code */
private IntPtr name;
private int name_len;
@@ -62,11 +60,7 @@ namespace System.Threading {
private int abort_state_handle;
/* thread_id is only accessed from unmanaged code */
internal Int64 thread_id;
/* start_notify is used by the runtime to signal that Start()
* is ok to return
*/
private IntPtr stack_ptr;
private IntPtr debugger_thread; // FIXME switch to bool as soon as CI testing with corlib version bump works
private UIntPtr static_data; /* GC-tracked */
private IntPtr runtime_thread_info;
/* current System.Runtime.Remoting.Contexts.Context instance
@@ -87,7 +81,7 @@ namespace System.Threading {
internal int managed_id;
private int small_id;
private IntPtr manage_callback;
private IntPtr interrupt_on_stop;
private IntPtr unused4;
private IntPtr flags;
private IntPtr thread_pinning_ref;
private IntPtr abort_protected_block_count;

View File

@@ -45,6 +45,8 @@ namespace System.Threading
{
protected static readonly IntPtr InvalidHandle = (IntPtr) (-1);
internal const int MaxWaitHandles = 64;
static int WaitMultiple(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext, bool WaitAll)
{
int release_last = -1;

Some files were not shown because too many files have changed in this diff Show More