Преглед изворни кода

NS2.1 Sync new changes, mobile profiles (#13198)

* Add RuntimeHelpers.GetSubArray. Add missing types to NS's TypeForwarders.cs

* more NS2.1 changes

* ios changes

* Update Decimal (it's now readonly struct)

* fix mcs

* add ROMC.cs

* Fix tests, finish monodroid profile

* Make SRE-not-supported NS2.1 compatible

* Make monotouch_tv and watch NS2.1 compatible

* make some SRE types more NS21 compatible (non-abstract now)

* bump corefx

* More NS21 fixes

* bump coreclr acceptance tests

* Bump API snapshot submodule

* [csproj] Update project files
Egor Bogatov пре 6 година
родитељ
комит
e42bf95d14
67 измењених фајлова са 1665 додато и 1714 уклоњено
  1. 1 1
      acceptance-tests/SUBMODULES.json
  2. 1 1
      external/api-snapshot
  3. 1 1
      external/corefx
  4. 50 0
      mcs/class/Facades/System.Drawing.Common/TypeForwarders.cs
  5. 2 2
      mcs/class/Facades/netstandard/Facades_netstandard.csproj
  6. 3 3
      mcs/class/Facades/netstandard/Makefile
  7. 17 7
      mcs/class/Facades/netstandard/TypeForwarders.cs
  8. 31 20
      mcs/class/System.Core/System.Core.csproj
  9. 9 0
      mcs/class/System.Core/common_System.Core.dll.sources
  10. 0 4
      mcs/class/System.Core/net_4_x_System.Core.dll.sources
  11. 3 0
      mcs/class/System.Core/win32_net_4_x_System.Core.dll.exclude.sources
  12. 1 0
      mcs/class/System.Data/System.Data.csproj
  13. 1 0
      mcs/class/System.Data/corefx.common.sources
  14. 21 0
      mcs/class/System.Data/corefx/DbProviderFactories.mobile.cs
  15. 3 0
      mcs/class/System.Net.Http/HttpClientHandler.Legacy.cs
  16. 10 0
      mcs/class/System.Net.Http/System.Net.Http.csproj
  17. 2 0
      mcs/class/System.Net.Http/System.Net.Http/HttpClient.android.cs
  18. 6 0
      mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs
  19. 3 0
      mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.platformnotsupported.cs
  20. 3 0
      mcs/class/System.Net.Http/System.Net.Http/HttpMethod.cs
  21. 13 0
      mcs/class/System.Net.Http/corefx/ReadOnlyMemoryContent.cs
  22. 1 0
      mcs/class/System.Net.Http/legacy.sources
  23. 1 2
      mcs/class/System.XML/System.Xml.Serialization/XmlArrayAttribute.cs
  24. 1 2
      mcs/class/System.XML/System.Xml.Serialization/XmlChoiceIdentifierAttribute.cs
  25. 4 3
      mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
  26. 1 1
      mcs/class/System.XML/System.Xml.Serialization/XmlSerializerAssemblyAttribute.cs
  27. 1 4
      mcs/class/System.Xaml/Test/System.Xaml/XamlLanguageTest.cs
  28. 16 0
      mcs/class/System/System.IO/FileSystemWatcher.DefaultEventAttribute.cs
  29. 24 0
      mcs/class/System/System.Net.Security/SslApplicationProtocol.pns.cs
  30. 20 0
      mcs/class/System/System.Net.Security/SslClientAuthenticationOptions.pns.cs
  31. 20 0
      mcs/class/System/System.Net.Security/SslServerAuthenticationOptions.pns.cs
  32. 67 256
      mcs/class/System/System.Net.Security/SslStream.platformnotsupported.cs
  33. 2 0
      mcs/class/System/System.Net/HttpWebResponse.cs
  34. 2 0
      mcs/class/System/System.Net/HttpWebResponse.platformnotsupported.cs
  35. 12 0
      mcs/class/System/System.csproj
  36. 1 0
      mcs/class/System/mobile_System.dll.sources
  37. 3 0
      mcs/class/System/monotouch_watch_System.dll.sources
  38. 1 0
      mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.pns.cs
  39. 21 1
      mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.pns.cs
  40. 3 0
      mcs/class/corlib/System.Reflection.Emit/DynamicMethod.notsupported.cs
  41. 62 80
      mcs/class/corlib/System.Reflection.Emit/EnumBuilder.pns.cs
  42. 2 0
      mcs/class/corlib/System.Reflection.Emit/EventBuilder.pns.cs
  43. 18 49
      mcs/class/corlib/System.Reflection.Emit/FieldBuilder.pns.cs
  44. 74 78
      mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.pns.cs
  45. 4 0
      mcs/class/corlib/System.Reflection.Emit/ILGenerator.pns.cs
  46. 48 75
      mcs/class/corlib/System.Reflection.Emit/MethodBuilder.pns.cs
  47. 151 87
      mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.pns.cs
  48. 2 0
      mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.pns.cs
  49. 30 73
      mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.pns.cs
  50. 8 0
      mcs/class/corlib/System.Reflection.Emit/SignatureHelper.pns.cs
  51. 113 246
      mcs/class/corlib/System.Reflection.Emit/TypeBuilder.pns.cs
  52. 20 0
      mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
  53. 8 0
      mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
  54. 1 1
      mcs/class/corlib/System.Threading/Timer.cs
  55. 1 1
      mcs/class/corlib/Test/System/DecimalTest2.cs
  56. 2 0
      mcs/class/corlib/corefx/SR.missing.cs
  57. 1 1
      mcs/class/corlib/corefx/Stream.cs
  58. 66 0
      mcs/class/corlib/corefx/SwitchExpressionException.cs
  59. 11 0
      mcs/class/corlib/corefx/TextWriter.cs
  60. 1 1
      mcs/class/corlib/corert/CancellationTokenRegistration.cs
  61. 389 430
      mcs/class/corlib/corert/Decimal.DecCalc.cs
  62. 241 262
      mcs/class/corlib/corert/Decimal.cs
  63. 2 0
      mcs/class/corlib/corlib.csproj
  64. 2 1
      mcs/class/corlib/corlib.dll.sources
  65. 1 1
      mcs/class/referencesource/mscorlib/system/io/binarywriter.cs
  66. 0 4
      mcs/class/referencesource/mscorlib/system/threading/waithandle.cs
  67. 25 16
      mcs/class/referencesource/mscorlib/system/timezoneinfo.cs

+ 1 - 1
acceptance-tests/SUBMODULES.json

@@ -10,7 +10,7 @@
   {
     "name": "coreclr", 
     "url": "git://github.com/mono/coreclr.git", 
-    "rev": "1e8d7a94155a04a6556a7ae9ef8dc5841b3ab206",
+    "rev": "90f7060935732bb624e1f325d23f63072433725f",
     "remote-branch": "origin/mono", 
     "branch": "mono", 
     "directory": "coreclr"

+ 1 - 1
external/api-snapshot

@@ -1 +1 @@
-Subproject commit 9c5aa2c4c79b91358812fd2614d3d6cdb763c619
+Subproject commit 0c8a9d25123bfb9fbcec53f2b5bebfd041df32d6

+ 1 - 1
external/corefx

@@ -1 +1 @@
-Subproject commit 4395ed087fde44d1d7cd15e185fab35fc835ab49
+Subproject commit 66d6f10f7fae097ec19570f7f22f0eccbe27de9b

+ 50 - 0
mcs/class/Facades/System.Drawing.Common/TypeForwarders.cs

@@ -568,7 +568,57 @@ namespace System.Drawing
         public System.Drawing.Size ToSize() { throw new PlatformNotSupportedException(); }
         public override string ToString() { throw new PlatformNotSupportedException(); }
     }
+#else // MONODROID
+    // Added for NS2.1 support
+    public partial class SizeFConverter : System.ComponentModel.TypeConverter
+    {
+        public SizeFConverter() => throw new PlatformNotSupportedException();
+        public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw new PlatformNotSupportedException();
+        public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw new PlatformNotSupportedException();
+        public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw new PlatformNotSupportedException();
+        public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+        public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw new PlatformNotSupportedException();
+        public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+    }
+    public partial class RectangleConverter : System.ComponentModel.TypeConverter
+    {
+        public RectangleConverter() => throw new PlatformNotSupportedException();
+        public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw new PlatformNotSupportedException();
+        public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw new PlatformNotSupportedException();
+        public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw new PlatformNotSupportedException();
+        public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+        public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw new PlatformNotSupportedException();
+        public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+    }
 
+    public partial class SizeConverter : System.ComponentModel.TypeConverter
+    {
+        public SizeConverter() => throw new PlatformNotSupportedException();
+        public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw new PlatformNotSupportedException();
+        public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw new PlatformNotSupportedException();
+        public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw new PlatformNotSupportedException();
+        public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+        public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw new PlatformNotSupportedException();
+        public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+    }
+    public partial class PointConverter : System.ComponentModel.TypeConverter
+    {
+        public PointConverter() => throw new PlatformNotSupportedException();
+        public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw new PlatformNotSupportedException();
+        public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw new PlatformNotSupportedException();
+        public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw new PlatformNotSupportedException();
+        public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw new PlatformNotSupportedException();
+        public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+        public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw new PlatformNotSupportedException();
+        public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw new PlatformNotSupportedException();
+    }
 #endif // !MONODROID
 
 }

+ 2 - 2
mcs/class/Facades/netstandard/Facades_netstandard.csproj

@@ -28,12 +28,12 @@
   <PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
     <OutputPath>./../../../class/lib/net_4_x-$(HostPlatform)/Facades</OutputPath>
     <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;NS21</DefineConstants>
+    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;SYSTEM_DRAWING</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
     <OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
     <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
-    <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
+    <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;SYSTEM_DRAWING</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
     <OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>

+ 3 - 3
mcs/class/Facades/netstandard/Makefile

@@ -11,7 +11,7 @@ LIBRARY = netstandard.dll
 
 KEYFILE = ../../Open.snk
 LIBRARY_SNK = $(KEYFILE)
-SIGN_FLAGS = /delaysign /nowarn:1616,1699 /nowarn:618
+SIGN_FLAGS = /delaysign /nowarn:1616,1699,618 
 LIB_REFS = System System.Xml System.Xml.Linq System.Core System.Numerics System.Net.Http \
 System.IO.Compression System.ComponentModel.Composition System.IO.Compression.FileSystem
 
@@ -32,14 +32,14 @@ endif
 endif
 
 ifeq ($(PROFILE),net_4_x)
-# TODO: remove once mobile profile supports NS 2.1
-LIB_MCS_FLAGS := -d:NS21
+LIB_MCS_FLAGS := -d:SYSTEM_DRAWING
 endif
 
 ifeq ($(PROFILE),monodroid)
 # XA implements System.Drawing API inside Mono.Android
 API_BIN_REFS := Mono.Android
 LIB_REFS += Facades/System.Drawing.Common
+LIB_MCS_FLAGS := -d:SYSTEM_DRAWING
 endif
 
 ifeq ($(PROFILE),monotouch)

+ 17 - 7
mcs/class/Facades/netstandard/TypeForwarders.cs

@@ -2405,7 +2405,17 @@
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Xsl.XslTransform))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Xsl.XsltSettings))]
 
-#if NS21
+#if !BOOTSTRAP_BASIC // NS2.1:
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Range))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Index))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerator<>))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorMethodBuilder))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.SwitchExpressionException))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.HashCode))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.MathF))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Memory<>))]
@@ -2433,14 +2443,16 @@
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Parser))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.CollectionExtensions))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyValuePair))]
-[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbProviderFactories))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.EventSourceCreatedEventArgs))]
-[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.ColorConverter))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.KnownColor))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbProviderFactories))]
+#if SYSTEM_DRAWING
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.ColorConverter))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.PointConverter))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.RectangleConverter))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SizeConverter))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SizeFConverter))]
+#endif
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.ISOWeek))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EnumerationOptions))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.MatchCasing))]
@@ -2452,14 +2464,12 @@
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemEnumerable<>))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemEnumerator<>))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemName))]
-//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.ReadOnlyMemoryContent))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.ReadOnlyMemoryContent))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.ServerCertificateSelectionCallback))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.SslApplicationProtocol))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.SslClientAuthenticationOptions))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.SslServerAuthenticationOptions))]
-#if !BOOTSTRAP_BASIC
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Sockets.UnixDomainSocketEndPoint))]
-#endif
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.ValueWebSocketReceiveResult))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
@@ -2527,6 +2537,7 @@
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SequencePosition))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CryptographicOperations))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDiffieHellman))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Serialization.SchemaImporter))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.CertificateRequest))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.DSACertificateExtensions))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.SubjectAlternativeNameBuilder))]
@@ -2537,5 +2548,4 @@
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ValueTaskSourceStatus))]
-[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Serialization.SchemaImporter))]
 #endif

+ 31 - 20
mcs/class/System.Core/System.Core.csproj

@@ -471,6 +471,9 @@
     <Compile Include="..\..\..\external\corefx\src\System.Linq\src\System\Linq\Utilities.cs" />
     <Compile Include="..\..\..\external\corefx\src\System.Linq\src\System\Linq\Where.cs" />
     <Compile Include="..\..\..\external\corefx\src\System.Linq\src\System\Linq\Zip.cs" />
+    <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.cs" />
+    <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxy.cs" />
+    <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxyGenerator.cs" />
     <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.Algorithms\src\System\Security\Cryptography\ECCurve.ECCurveType.cs" />
     <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.Algorithms\src\System\Security\Cryptography\ECCurve.NamedCurves.cs" />
     <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.Algorithms\src\System\Security\Cryptography\ECCurve.cs" />
@@ -503,6 +506,7 @@
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\CngProperty.cs" />
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\CngProvider.cs" />
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\CngUIPolicy.cs" />
+    <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellmanPublicKey.cs" />
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDsa.cs" />
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDsaCng.cs" />
@@ -549,6 +553,8 @@
   <Choose>
     <When Condition="'$(Platform)' == 'xammac'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\Collections\Generic\ReferenceEqualityComparer.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\NotImplemented.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Dynamic\Utils\Helpers.cs" />
@@ -578,6 +584,7 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\StackSpiller.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -587,6 +594,8 @@
     </When>
     <When Condition="'$(Platform)' == 'winaot'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AddInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AndInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\ArrayOperations.cs" />
@@ -632,8 +641,8 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\SubInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\TypeOperations.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\Utilities.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-        <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -650,6 +659,8 @@
     </When>
     <When Condition="'$(Platform)' == 'wasm'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\Collections\Generic\ReferenceEqualityComparer.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\NotImplemented.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Dynamic\Utils\Helpers.cs" />
@@ -679,8 +690,8 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\StackSpiller.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-        <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -697,6 +708,8 @@
     </When>
     <When Condition="'$(Platform)' == 'unreal'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\Collections\Generic\ReferenceEqualityComparer.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\NotImplemented.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Dynamic\Utils\Helpers.cs" />
@@ -726,8 +739,8 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\StackSpiller.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-        <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -744,6 +757,8 @@
     </When>
     <When Condition="'$(Platform)' == 'orbis'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AddInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AndInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\ArrayOperations.cs" />
@@ -789,8 +804,8 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\SubInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\TypeOperations.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\Utilities.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-        <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -881,11 +896,7 @@
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Windows.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxy.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxyGenerator.cs" />
             <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-            <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
             <Compile Include="..\referencesource\System.Core\System\threading\ReaderWriterLockSlim\LockRecursionException.cs" />
             <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.Windows.cs" />
             <Compile Include="System.IO.Pipes\NamedPipeClientStream.Windows.cs" />
@@ -961,11 +972,7 @@
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxy.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxyGenerator.cs" />
             <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-            <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
             <Compile Include="..\referencesource\System.Core\System\threading\ReaderWriterLockSlim\LockRecursionException.cs" />
             <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.Unix.cs" />
             <Compile Include="System.IO.Pipes\NamedPipeClientStream.Unix.cs" />
@@ -1041,11 +1048,7 @@
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxy.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxyGenerator.cs" />
             <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-            <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
             <Compile Include="..\referencesource\System.Core\System\threading\ReaderWriterLockSlim\LockRecursionException.cs" />
             <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.Unix.cs" />
             <Compile Include="System.IO.Pipes\NamedPipeClientStream.Unix.cs" />
@@ -1121,11 +1124,7 @@
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
             <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxy.cs" />
-            <Compile Include="..\..\..\external\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxyGenerator.cs" />
             <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
-            <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECDiffieHellman.cs" />
             <Compile Include="..\referencesource\System.Core\System\threading\ReaderWriterLockSlim\LockRecursionException.cs" />
             <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.Unix.cs" />
             <Compile Include="System.IO.Pipes\NamedPipeClientStream.Unix.cs" />
@@ -1144,6 +1143,8 @@
     </When>
     <When Condition="'$(Platform)' == 'monotouch_watch'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AddInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AndInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\ArrayOperations.cs" />
@@ -1189,6 +1190,7 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\SubInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\TypeOperations.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\Utilities.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -1198,6 +1200,8 @@
     </When>
     <When Condition="'$(Platform)' == 'monotouch_tv'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AddInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AndInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\ArrayOperations.cs" />
@@ -1243,6 +1247,7 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\SubInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\TypeOperations.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\Utilities.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -1252,6 +1257,8 @@
     </When>
     <When Condition="'$(Platform)' == 'monotouch'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AddInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\AndInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\ArrayOperations.cs" />
@@ -1297,6 +1304,7 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\SubInstruction.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\TypeOperations.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\Utilities.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
@@ -1306,6 +1314,8 @@
     </When>
     <When Condition="'$(Platform)' == 'monodroid'">
       <ItemGroup>
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
+        <Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.GetDomainSocketSizes.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\Collections\Generic\ReferenceEqualityComparer.cs" />
         <Compile Include="..\..\..\external\corefx\src\Common\src\System\NotImplemented.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Dynamic\Utils\Helpers.cs" />
@@ -1335,6 +1345,7 @@
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\StackSpiller.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Linq\Expressions\Compiler\VariableBinder.cs" />
         <Compile Include="..\..\..\external\corefx\src\System.Linq.Expressions\src\System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs" />
+        <Compile Include="..\..\..\external\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UnixDomainSocketEndPoint.Unix.cs" />
         <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\AesManaged.cs" />
         <Compile Include="System.IO.Pipes\AnonymousPipeServerStream.NotSupported.cs" />
         <Compile Include="System.IO.Pipes\NamedPipeClientStream.NotSupported.cs" />

+ 9 - 0
mcs/class/System.Core/common_System.Core.dll.sources

@@ -75,6 +75,7 @@ corefx/SR.missing.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
 ../referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs
 ../referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
+../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
 
 ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
 
@@ -294,3 +295,11 @@ System.Security.Cryptography/SHA512CryptoServiceProvider.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.Generated.cs
 
 ../../../external/corefx/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/IncrementalHash.net46.cs
+
+../../../external/corefx/src/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.cs
+../../../external/corefx/src/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.Unix.cs
+../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.GetDomainSocketSizes.cs
+../../../external/corefx/src/Common/src/Interop/Unix/Interop.Libraries.cs
+
+../../../external/corefx/src/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
+../../../external/corefx/src/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs

+ 0 - 4
mcs/class/System.Core/net_4_x_System.Core.dll.sources

@@ -10,9 +10,5 @@ System.Security.Cryptography/SHA384Cng.cs
 System.Security.Cryptography/SHA512Cng.cs
 
 ../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs
-../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
 
 ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/LockRecursionException.cs
-
-../../../external/corefx/src/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
-../../../external/corefx/src/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs

+ 3 - 0
mcs/class/System.Core/win32_net_4_x_System.Core.dll.exclude.sources

@@ -0,0 +1,3 @@
+../../../external/corefx/src/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.Unix.cs
+../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.GetDomainSocketSizes.cs
+../../../external/corefx/src/Common/src/Interop/Unix/Interop.Libraries.cs

+ 1 - 0
mcs/class/System.Data/System.Data.csproj

@@ -521,6 +521,7 @@
     <Compile Include="System.Data.SqlClient\SQLDebugging.cs" />
     <Compile Include="System.Data.SqlClient\SqlCredential.cs" />
     <Compile Include="corefx\DbConnectionOptions.cs" />
+    <Compile Include="corefx\DbProviderFactories.mobile.cs" />
     <Compile Include="corefx\DiagnosticListener.cs" />
     <Compile Include="corefx\Odbc\AdapterUtil.cs" />
     <Compile Include="corefx\Odbc\Res.cs" />

+ 1 - 0
mcs/class/System.Data/corefx.common.sources

@@ -465,3 +465,4 @@ corefx/SqlDependencyUtils.cs
 ../../../external/corefx/src/System.Data.Odbc/src/Common/System/Data/Common/NameValuePermission.cs
 ../../../external/corefx/src/System.Data.Odbc/src/Common/System/Data/Common/SafeNativeMethods.cs
 ../../../external/corefx/src/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbBuffer.cs
+corefx/DbProviderFactories.mobile.cs

+ 21 - 0
mcs/class/System.Data/corefx/DbProviderFactories.mobile.cs

@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+#if MOBILE
+namespace System.Data.Common
+{
+    public static partial class DbProviderFactories
+    {
+        public static System.Data.Common.DbProviderFactory GetFactory(System.Data.Common.DbConnection connection) => throw new PlatformNotSupportedException();
+        public static System.Data.Common.DbProviderFactory GetFactory(System.Data.DataRow providerRow) => throw new PlatformNotSupportedException();
+        public static System.Data.Common.DbProviderFactory GetFactory(string providerInvariantName) => throw new PlatformNotSupportedException();
+        public static System.Data.DataTable GetFactoryClasses() => throw new PlatformNotSupportedException();
+        public static System.Collections.Generic.IEnumerable<string> GetProviderInvariantNames() => throw new PlatformNotSupportedException();
+        public static void RegisterFactory(string providerInvariantName, System.Data.Common.DbProviderFactory factory) => throw new PlatformNotSupportedException();
+        public static void RegisterFactory(string providerInvariantName, string factoryTypeAssemblyQualifiedName) => throw new PlatformNotSupportedException();
+        public static void RegisterFactory(string providerInvariantName, System.Type providerFactoryClass) => throw new PlatformNotSupportedException();
+        public static bool TryGetFactory(string providerInvariantName, out System.Data.Common.DbProviderFactory factory) => throw new PlatformNotSupportedException();
+        public static bool UnregisterFactory(string providerInvariantName) => throw new PlatformNotSupportedException();
+    }
+}
+#endif

+ 3 - 0
mcs/class/System.Net.Http/HttpClientHandler.Legacy.cs

@@ -7,5 +7,8 @@ namespace System.Net.Http
 	partial class HttpClientHandler : HttpMessageHandler
 	{
 		static IMonoHttpClientHandler CreateDefaultHandler () => new MonoWebRequestHandler ();
+
+		// NS2.1:
+		public static System.Func<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool> DangerousAcceptAnyServerCertificateValidator => throw new PlatformNotSupportedException ();
 	}
 }

+ 10 - 0
mcs/class/System.Net.Http/System.Net.Http.csproj

@@ -178,6 +178,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'winaot'">
@@ -240,6 +241,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'wasm'">
@@ -303,6 +305,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'unreal'">
@@ -365,6 +368,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'orbis'">
@@ -427,6 +431,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'net_4_x'">
@@ -492,6 +497,7 @@
             <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
             <Compile Include="System.Net.Http\StreamContent.cs" />
             <Compile Include="System.Net.Http\StringContent.cs" />
+            <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
           </ItemGroup>
         </When>
         <When Condition="'$(HostPlatform)' == 'unix'">
@@ -900,6 +906,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'monotouch_tv'">
@@ -967,6 +974,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'monotouch'">
@@ -1034,6 +1042,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
     <When Condition="'$(Platform)' == 'monodroid'">
@@ -1097,6 +1106,7 @@
         <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
         <Compile Include="System.Net.Http\StreamContent.cs" />
         <Compile Include="System.Net.Http\StringContent.cs" />
+        <Compile Include="corefx\ReadOnlyMemoryContent.cs" />
       </ItemGroup>
     </When>
   </Choose>

+ 2 - 0
mcs/class/System.Net.Http/System.Net.Http/HttpClient.android.cs

@@ -1,5 +1,7 @@
 using System;
 using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
 
 namespace System.Net.Http {
 	public partial class HttpClient {

+ 6 - 0
mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs

@@ -335,5 +335,11 @@ namespace System.Net.Http
 				return await resp.Content.ReadAsStringAsync ().ConfigureAwait (false);
 			}
 		}
+
+		// NS2.1 methods, added here while CoreFX HttpClient PR is not merged
+		public Task<HttpResponseMessage> PatchAsync(string requestUri, HttpContent content) => throw new PlatformNotSupportedException();
+		public Task<HttpResponseMessage> PatchAsync(string requestUri, HttpContent content, CancellationToken cancellationToken) => throw new PlatformNotSupportedException();
+		public Task<HttpResponseMessage> PatchAsync(Uri requestUri, HttpContent content) => throw new PlatformNotSupportedException();
+		public Task<HttpResponseMessage> PatchAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken) => throw new PlatformNotSupportedException();
 	}
 }

+ 3 - 0
mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.platformnotsupported.cs

@@ -169,5 +169,8 @@ namespace System.Net.Http
 			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
 			set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
 		}
+
+		// NS2.1:
+		public static System.Func<System.Net.Http.HttpRequestMessage, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool> DangerousAcceptAnyServerCertificateValidator => throw new PlatformNotSupportedException ();
 	}
 }

+ 3 - 0
mcs/class/System.Net.Http/System.Net.Http/HttpMethod.cs

@@ -131,5 +131,8 @@ namespace System.Net.Http
 		{
 			return method;
 		}
+
+		// NS2.1:
+		public static System.Net.Http.HttpMethod Patch => throw new PlatformNotSupportedException ();
 	}
 }

+ 13 - 0
mcs/class/System.Net.Http/corefx/ReadOnlyMemoryContent.cs

@@ -0,0 +1,13 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Net.Http
+{
+    public sealed partial class ReadOnlyMemoryContent : System.Net.Http.HttpContent
+    {
+        public ReadOnlyMemoryContent(System.ReadOnlyMemory<byte> content) => throw new PlatformNotSupportedException();
+        protected internal override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw new PlatformNotSupportedException();
+        protected internal override bool TryComputeLength(out long length) => throw new PlatformNotSupportedException();
+    }
+}

+ 1 - 0
mcs/class/System.Net.Http/legacy.sources

@@ -22,6 +22,7 @@ System.Net.Http/MultipartContent.cs
 System.Net.Http/MultipartFormDataContent.cs
 System.Net.Http/StreamContent.cs
 System.Net.Http/StringContent.cs
+corefx/ReadOnlyMemoryContent.cs
 System.Net.Http.Headers/AuthenticationHeaderValue.cs
 System.Net.Http.Headers/CacheControlHeaderValue.cs
 System.Net.Http.Headers/CollectionExtensions.cs

+ 1 - 2
mcs/class/System.XML/System.Xml.Serialization/XmlArrayAttribute.cs

@@ -36,8 +36,7 @@ namespace System.Xml.Serialization
 	/// <summary>
 	/// Summary description for XmlArrayAttribute.
 	/// </summary>
-	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
-	| AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
+	[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]
 	public class XmlArrayAttribute : Attribute
 	{
 		private string elementName;

+ 1 - 2
mcs/class/System.XML/System.Xml.Serialization/XmlChoiceIdentifierAttribute.cs

@@ -36,8 +36,7 @@ namespace System.Xml.Serialization
 	/// <summary>
 	/// Summary description for XmlChoiceIdentifierAttribute.
 	/// </summary>
-	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field
-		 | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
+	[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]
 	public class XmlChoiceIdentifierAttribute : Attribute
 	{
 		private string memberName;

+ 4 - 3
mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs

@@ -43,10 +43,11 @@ using System.Xml.Serialization.Configuration;
 
 namespace System.Xml.Serialization 
 {
-	public class XmlSchemaImporter
-#if !MOBILE
-		: SchemaImporter
+#if MOBILE
+    public abstract class SchemaImporter {}
 #endif
+
+	public class XmlSchemaImporter : SchemaImporter
 	{
 		#region Fields
 

+ 1 - 1
mcs/class/System.XML/System.Xml.Serialization/XmlSerializerAssemblyAttribute.cs

@@ -33,7 +33,7 @@ using System;
 
 namespace System.Xml.Serialization 
 {
-	[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Enum)]
+	[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct, AllowMultiple=false)]
 	public sealed class XmlSerializerAssemblyAttribute : Attribute
 	{	
 		string _assemblyName;

+ 1 - 4
mcs/class/System.Xaml/Test/System.Xaml/XamlLanguageTest.cs

@@ -806,10 +806,7 @@ namespace MonoTests.System.Xaml
 
 			var l = t.GetAllMembers ().ToArray ();
 
-			if (underlyingType == typeof (decimal))
-				Assert.AreEqual (6, l.Length, "#31"); //decimal has 6 internal properties (see Decimal.DecCalc.cs)
-			else
-				Assert.AreEqual (0, l.Length, "#31");
+			Assert.AreEqual (0, l.Length, "#31");
 		}
 
 		void TestXamlTypeExtension (XamlType t, string name, Type underlyingType, Type extReturnType, bool noTypeConverter)

+ 16 - 0
mcs/class/System/System.IO/FileSystemWatcher.DefaultEventAttribute.cs

@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#if !MOBILE
+namespace System.IO.CoreFX
+#else
+namespace System.IO
+#endif
+{
+    // Add DefaultEventAdttribute for NS2.1 support
+    [System.ComponentModel.DefaultEventAttribute("Changed")]
+    public partial class FileSystemWatcher
+    {
+    }
+}

+ 24 - 0
mcs/class/System/System.Net.Security/SslApplicationProtocol.pns.cs

@@ -0,0 +1,24 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Net.Security
+{
+    public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string hostName);
+    
+    public readonly partial struct SslApplicationProtocol : System.IEquatable<System.Net.Security.SslApplicationProtocol>
+    {
+        private readonly object _dummy;
+        public static readonly System.Net.Security.SslApplicationProtocol Http11;
+        public static readonly System.Net.Security.SslApplicationProtocol Http2;
+        public SslApplicationProtocol(byte[] protocol) { throw new PlatformNotSupportedException(); }
+        public SslApplicationProtocol(string protocol) { throw new PlatformNotSupportedException(); }
+        public System.ReadOnlyMemory<byte> Protocol { get { throw new PlatformNotSupportedException(); } }
+        public bool Equals(System.Net.Security.SslApplicationProtocol other) { throw new PlatformNotSupportedException(); }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Net.Security.SslApplicationProtocol left, System.Net.Security.SslApplicationProtocol right) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Net.Security.SslApplicationProtocol left, System.Net.Security.SslApplicationProtocol right) { throw new PlatformNotSupportedException(); }
+        public override string ToString() { throw new PlatformNotSupportedException(); }
+    }
+}

+ 20 - 0
mcs/class/System/System.Net.Security/SslClientAuthenticationOptions.pns.cs

@@ -0,0 +1,20 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Net.Security
+{
+    public partial class SslClientAuthenticationOptions
+    {
+        public SslClientAuthenticationOptions() => throw new PlatformNotSupportedException();
+        public bool AllowRenegotiation { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Collections.Generic.List<System.Net.Security.SslApplicationProtocol> ApplicationProtocols { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Security.Cryptography.X509Certificates.X509RevocationMode CertificateRevocationCheckMode { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Security.Authentication.SslProtocols EnabledSslProtocols { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Net.Security.EncryptionPolicy EncryptionPolicy { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Net.Security.LocalCertificateSelectionCallback LocalCertificateSelectionCallback { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get { throw new PlatformNotSupportedException(); } set { } }
+        public string TargetHost { get { throw new PlatformNotSupportedException(); } set { } }
+    }
+}

+ 20 - 0
mcs/class/System/System.Net.Security/SslServerAuthenticationOptions.pns.cs

@@ -0,0 +1,20 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Net.Security
+{
+    public partial class SslServerAuthenticationOptions
+    {
+        public SslServerAuthenticationOptions() => throw new PlatformNotSupportedException();
+        public bool AllowRenegotiation { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Collections.Generic.List<System.Net.Security.SslApplicationProtocol> ApplicationProtocols { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Security.Cryptography.X509Certificates.X509RevocationMode CertificateRevocationCheckMode { get { throw new PlatformNotSupportedException(); } set { } }
+        public bool ClientCertificateRequired { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Security.Authentication.SslProtocols EnabledSslProtocols { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Net.Security.EncryptionPolicy EncryptionPolicy { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificate { get { throw new PlatformNotSupportedException(); } set { } }
+        public System.Net.Security.ServerCertificateSelectionCallback ServerCertificateSelectionCallback { get { throw new PlatformNotSupportedException(); } set { } }
+    }
+}

+ 67 - 256
mcs/class/System/System.Net.Security/SslStream.platformnotsupported.cs

@@ -48,262 +48,73 @@ namespace System.Net.Security
 		X509Certificate remoteCertificate,
 		string[] acceptableIssuers);
 
-	public class SslStream : AuthenticatedStream
+	public partial class SslStream : System.Net.Security.AuthenticatedStream
 	{
-		const string EXCEPTION_MESSAGE = "System.Net.Security.SslStream is not supported on the current platform.";
-
-		public SslStream (Stream innerStream)
-			: this (innerStream, false)
-		{
-		}
-
-		public SslStream (Stream innerStream, bool leaveInnerStreamOpen)
-			: base (innerStream, leaveInnerStreamOpen)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public SslStream (Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback)
-			: this (innerStream, leaveInnerStreamOpen)
-		{
-		}
-
-		public SslStream (Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback)
-			: this (innerStream, leaveInnerStreamOpen)
-		{
-		}
-
-		public SslStream (Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy)
-			: this (innerStream, leaveInnerStreamOpen)
-		{
-		}
-
-		public virtual void AuthenticateAsClient (string targetHost)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual void EndAuthenticateAsClient (IAsyncResult asyncResult)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual void AuthenticateAsServer (X509Certificate serverCertificate)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual void EndAuthenticateAsServer (IAsyncResult asyncResult)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public TransportContext TransportContext {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual Task AuthenticateAsClientAsync (string targetHost)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual Task AuthenticateAsServerAsync (X509Certificate serverCertificate)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public virtual Task ShutdownAsync ()
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override bool IsAuthenticated {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool IsMutuallyAuthenticated {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool IsEncrypted {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool IsSigned {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool IsServer {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual SslProtocols SslProtocol {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual bool CheckCertRevocationStatus {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual X509Certificate LocalCertificate {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual X509Certificate RemoteCertificate {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual CipherAlgorithmType CipherAlgorithm {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual int CipherStrength {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual HashAlgorithmType HashAlgorithm {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual int HashStrength {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual ExchangeAlgorithmType KeyExchangeAlgorithm {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public virtual int KeyExchangeStrength {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool CanSeek {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool CanRead {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool CanTimeout {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override bool CanWrite {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override int ReadTimeout {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-			set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override int WriteTimeout {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-			set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override long Length {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override long Position {
-			get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-			set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-		}
-
-		public override void SetLength (long value)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override long Seek (long offset, SeekOrigin origin)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override void Flush ()
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		protected override void Dispose (bool disposing)
-		{
-		}
-
-		public override int Read (byte[] buffer, int offset, int count)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public void Write (byte[] buffer)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override void Write (byte[] buffer, int offset, int count)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override int EndRead (IAsyncResult asyncResult)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
-
-		public override void EndWrite (IAsyncResult asyncResult)
-		{
-			throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-		}
+		public SslStream(System.IO.Stream innerStream) : base (default(System.IO.Stream), default(bool)) => throw new PlatformNotSupportedException ();
+		public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen) : base (default(System.IO.Stream), default(bool)) => throw new PlatformNotSupportedException ();
+		public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen, System.Net.Security.RemoteCertificateValidationCallback userCertificateValidationCallback) : base (default(System.IO.Stream), default(bool)) => throw new PlatformNotSupportedException ();
+		public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen, System.Net.Security.RemoteCertificateValidationCallback userCertificateValidationCallback, System.Net.Security.LocalCertificateSelectionCallback userCertificateSelectionCallback) : base (default(System.IO.Stream), default(bool)) => throw new PlatformNotSupportedException ();
+		public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen, System.Net.Security.RemoteCertificateValidationCallback userCertificateValidationCallback, System.Net.Security.LocalCertificateSelectionCallback userCertificateSelectionCallback, System.Net.Security.EncryptionPolicy encryptionPolicy) : base (default(System.IO.Stream), default(bool)) => throw new PlatformNotSupportedException ();
+		public override bool CanRead { get { throw new PlatformNotSupportedException (); } }
+		public override bool CanSeek { get { throw new PlatformNotSupportedException (); } }
+		public override bool CanTimeout { get { throw new PlatformNotSupportedException (); } }
+		public override bool CanWrite { get { throw new PlatformNotSupportedException (); } }
+		public virtual bool CheckCertRevocationStatus { get { throw new PlatformNotSupportedException (); } }
+		public virtual System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get { throw new PlatformNotSupportedException (); } }
+		public virtual int CipherStrength { get { throw new PlatformNotSupportedException (); } }
+		public virtual System.Security.Authentication.HashAlgorithmType HashAlgorithm { get { throw new PlatformNotSupportedException (); } }
+		public virtual int HashStrength { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsAuthenticated { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsEncrypted { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsMutuallyAuthenticated { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsServer { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSigned { get { throw new PlatformNotSupportedException (); } }
+		public virtual System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get { throw new PlatformNotSupportedException (); } }
+		public virtual int KeyExchangeStrength { get { throw new PlatformNotSupportedException (); } }
+		public override long Length { get { throw new PlatformNotSupportedException (); } }
+		public virtual System.Security.Cryptography.X509Certificates.X509Certificate LocalCertificate { get { throw new PlatformNotSupportedException (); } }
+		public System.Net.Security.SslApplicationProtocol NegotiatedApplicationProtocol { get { throw new PlatformNotSupportedException (); } }
+		public override long Position { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+		public override int ReadTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+		public virtual System.Security.Cryptography.X509Certificates.X509Certificate RemoteCertificate { get { throw new PlatformNotSupportedException (); } }
+		public virtual System.Security.Authentication.SslProtocols SslProtocol { get { throw new PlatformNotSupportedException (); } }
+		public System.Net.TransportContext TransportContext { get { throw new PlatformNotSupportedException (); } }
+		public override int WriteTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+		public virtual void AuthenticateAsClient(string targetHost) { throw new PlatformNotSupportedException (); }
+		public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions, System.Threading.CancellationToken cancellationToken) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) { throw new PlatformNotSupportedException (); }
+		public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions, System.Threading.CancellationToken cancellationToken) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { throw new PlatformNotSupportedException (); }
+		public virtual System.IAsyncResult BeginAuthenticateAsClient(string targetHost, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public virtual System.IAsyncResult BeginAuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public virtual System.IAsyncResult BeginAuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) { throw new PlatformNotSupportedException (); }
+		protected override void Dispose(bool disposing) { throw new PlatformNotSupportedException (); }
+		public override System.Threading.Tasks.ValueTask DisposeAsync() { throw new PlatformNotSupportedException (); }
+		public virtual void EndAuthenticateAsClient(System.IAsyncResult asyncResult) { throw new PlatformNotSupportedException (); }
+		public virtual void EndAuthenticateAsServer(System.IAsyncResult asyncResult) { throw new PlatformNotSupportedException (); }
+		public override int EndRead(System.IAsyncResult asyncResult) { throw new PlatformNotSupportedException (); }
+		public override void EndWrite(System.IAsyncResult asyncResult) { throw new PlatformNotSupportedException (); }
+		public override void Flush() { throw new PlatformNotSupportedException (); }
+		public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw new PlatformNotSupportedException (); }
+		public override int Read(byte[] buffer, int offset, int count) { throw new PlatformNotSupportedException (); }
+		public override long Seek(long offset, System.IO.SeekOrigin origin) { throw new PlatformNotSupportedException (); }
+		public override void SetLength(long value) { throw new PlatformNotSupportedException (); }
+		public virtual System.Threading.Tasks.Task ShutdownAsync() { throw new PlatformNotSupportedException (); }
+		public void Write(byte[] buffer) { throw new PlatformNotSupportedException (); }
+		public override void Write(byte[] buffer, int offset, int count) { throw new PlatformNotSupportedException (); }
 	}
 }

+ 2 - 0
mcs/class/System/System.Net/HttpWebResponse.cs

@@ -61,6 +61,8 @@ namespace System.Net
 		bool disposed;
 		Stream stream;
 		
+		public HttpWebResponse() { } // Added for NS2.1, it's empty in CoreFX too
+
 		// Constructors
 
 		internal HttpWebResponse (Uri uri, string method, HttpStatusCode status, WebHeaderCollection headers)

+ 2 - 0
mcs/class/System/System.Net/HttpWebResponse.platformnotsupported.cs

@@ -35,6 +35,8 @@ namespace System.Net
 	public class HttpWebResponse : WebResponse, ISerializable, IDisposable
 	{
 		const string EXCEPTION_MESSAGE = "System.Net.HttpWebResponse is not supported on the current platform.";
+		
+		public HttpWebResponse() { } // Added for NS2.1, it's empty in CoreFX too
 
 		[Obsolete ("Serialization is obsoleted for this type", false)]
 		protected HttpWebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext)

+ 12 - 0
mcs/class/System/System.csproj

@@ -1092,6 +1092,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -1212,6 +1213,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\Win32UnixFactoryPal.cs" />
         <Compile Include="System.Net.Security\SslStream.cs" />
@@ -1307,6 +1309,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -1431,6 +1434,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -1551,6 +1555,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -3658,6 +3663,7 @@
         <Compile Include="Mono.AppleTls\SafeHandles.cs" />
         <Compile Include="Mono.AppleTls\X509CertificateImplApple.cs" />
         <Compile Include="Mono.AppleTls\X509PalImpl.Apple.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.platformnotsupported.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -3685,6 +3691,9 @@
         <Compile Include="System.Net.NetworkInformation\UnixNetworkInterfaceFactory.cs" />
         <Compile Include="System.Net.NetworkInformation\UnixTcpStatistics.cs" />
         <Compile Include="System.Net.NetworkInformation\UnixUdpStatistics.cs" />
+        <Compile Include="System.Net.Security\SslApplicationProtocol.pns.cs" />
+        <Compile Include="System.Net.Security\SslClientAuthenticationOptions.pns.cs" />
+        <Compile Include="System.Net.Security\SslServerAuthenticationOptions.pns.cs" />
         <Compile Include="System.Net.Security\SslStream.platformnotsupported.cs" />
         <Compile Include="System.Net.Sockets\TcpClient.platformnotsupported.cs" />
         <Compile Include="System.Net.Sockets\TcpListener.platformnotsupported.cs" />
@@ -3783,6 +3792,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -3924,6 +3934,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />
@@ -4058,6 +4069,7 @@
         <Compile Include="Mono.Net.Security\MonoTlsStream.cs" />
         <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />
         <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />
+        <Compile Include="System.IO\FileSystemWatcher.DefaultEventAttribute.cs" />
         <Compile Include="System.Net.Mail\SmtpClient.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPInterfaceProperties.cs" />
         <Compile Include="System.Net.NetworkInformation\AixIPv4InterfaceProperties.cs" />

+ 1 - 0
mcs/class/System/mobile_System.dll.sources

@@ -3,4 +3,5 @@
 #include corefx.unix.sources
 ../../../external/corefx/src/Common/src/System/Net/ContextAwareResult.Unix.cs
 ../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.UnknownUnix.cs
+System.IO/FileSystemWatcher.DefaultEventAttribute.cs
 Internal.Cryptography/OidLookup.Managed.cs

+ 3 - 0
mcs/class/System/monotouch_watch_System.dll.sources

@@ -41,3 +41,6 @@ System.Net.WebSockets/HttpListenerWebSocketContext.platformnotsupported.cs
 ../Mono.Security/Mono.Security.X509.Extensions/BasicConstraintsExtension.cs
 ../Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs
 ../Mono.Security/Mono.Security.X509.Extensions/SubjectKeyIdentifierExtension.cs
+System.Net.Security/SslApplicationProtocol.pns.cs
+System.Net.Security/SslClientAuthenticationOptions.pns.cs
+System.Net.Security/SslServerAuthenticationOptions.pns.cs

+ 1 - 0
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.pns.cs

@@ -63,6 +63,7 @@ namespace System.Reflection.Emit
 			throw new PlatformNotSupportedException ();
 		}
 
+		public void SetEntryPoint (MethodInfo entryMethod) => throw new PlatformNotSupportedException ();
 	}
 }
 

+ 21 - 1
mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.pns.cs

@@ -26,11 +26,15 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
 #if !MONO_FEATURE_SRE
 
 namespace System.Reflection.Emit
 {
-	public abstract class ConstructorBuilder : ConstructorInfo
+	public class ConstructorBuilder : ConstructorInfo
 	{
 		public bool InitLocals { get; set; }
 
@@ -86,6 +90,22 @@ namespace System.Reflection.Emit
 		{
 			throw new PlatformNotSupportedException ();
 		}
+
+		public string Signature => throw new PlatformNotSupportedException ();
+		public Module GetModule () => throw new PlatformNotSupportedException ();
+		public MethodToken GetToken () => throw new PlatformNotSupportedException ();
+		public void SetMethodBody (byte[] il, int maxStack, byte[] localSignature,
+			IEnumerable<ExceptionHandler> exceptionHandlers, IEnumerable<int> tokenFixups) => 
+				throw new PlatformNotSupportedException ();
+
+		public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags() { throw new PlatformNotSupportedException (); }
+		public override System.RuntimeMethodHandle MethodHandle { get { throw new PlatformNotSupportedException (); } }
+		public override object Invoke(System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
+		public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(bool inherit) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
+		public override object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
 	}
 }
 

+ 3 - 0
mcs/class/corlib/System.Reflection.Emit/DynamicMethod.notsupported.cs

@@ -145,6 +145,9 @@ namespace System.Reflection.Emit
 		public override object Invoke (object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) { throw new PlatformNotSupportedException (); }
 
 		public override bool IsDefined (Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+
+		public ParameterBuilder DefineParameter (int position, ParameterAttributes attributes, string parameterName) => throw new PlatformNotSupportedException ();
+		public DynamicILInfo GetDynamicILInfo () => throw new PlatformNotSupportedException ();
 	}
 }
 

+ 62 - 80
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.pns.cs

@@ -30,87 +30,69 @@
 
 namespace System.Reflection.Emit
 {
-	public abstract class EnumBuilder : TypeInfo
+	public sealed partial class EnumBuilder : System.Reflection.TypeInfo
 	{
-		public FieldBuilder UnderlyingField {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Assembly Assembly {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string AssemblyQualifiedName {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type BaseType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string FullName {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Guid GUID {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Module Module {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Name {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-		
-		public override string Namespace {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public TypeInfo CreateTypeInfo ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineLiteral (string literalName, object literalValue)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public override System.Type GetElementType ()
-		{
-			throw new PlatformNotSupportedException ();
-		}		
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-		
+		internal EnumBuilder() { throw new PlatformNotSupportedException (); } 
+		public override System.Reflection.Assembly Assembly { get { throw new PlatformNotSupportedException (); } }
+		public override string AssemblyQualifiedName { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type BaseType { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
+		public override string FullName { get { throw new PlatformNotSupportedException (); } }
+		public override System.Guid GUID { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsByRefLike { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsConstructedGenericType { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSZArray { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsTypeDefinition { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsVariableBoundArray { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
+		public override string Name { get { throw new PlatformNotSupportedException (); } }
+		public override string Namespace { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
+		public override System.RuntimeTypeHandle TypeHandle { get { throw new PlatformNotSupportedException (); } }
+		public System.Reflection.Emit.TypeToken TypeToken { get { throw new PlatformNotSupportedException (); } }
+		public System.Reflection.Emit.FieldBuilder UnderlyingField { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type UnderlyingSystemType { get { throw new PlatformNotSupportedException (); } }
+		public System.Type CreateType() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.TypeInfo CreateTypeInfo() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.FieldBuilder DefineLiteral(string literalName, object literalValue) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(bool inherit) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetElementType() { throw new PlatformNotSupportedException (); }
+		public override System.Type GetEnumUnderlyingType() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo[] GetEvents() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetInterface(string name, bool ignoreCase) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetInterfaces() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		protected override bool HasElementTypeImpl() { throw new PlatformNotSupportedException (); }
+		public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) { throw new PlatformNotSupportedException (); }
+		protected override bool IsArrayImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsByRefImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsCOMObjectImpl() { throw new PlatformNotSupportedException (); }
+		public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		protected override bool IsPointerImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsPrimitiveImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsValueTypeImpl() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeArrayType() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeArrayType(int rank) { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeByRefType() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakePointerType() { throw new PlatformNotSupportedException (); }
+		public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); } 
 	}
 }
 

+ 2 - 0
mcs/class/corlib/System.Reflection.Emit/EventBuilder.pns.cs

@@ -61,6 +61,8 @@ namespace System.Reflection.Emit
 		{
 			throw new PlatformNotSupportedException ();
 		}
+
+		public EventToken GetEventToken () => throw new PlatformNotSupportedException ();
 	}
 }
 

+ 18 - 49
mcs/class/corlib/System.Reflection.Emit/FieldBuilder.pns.cs

@@ -30,56 +30,25 @@
 
 namespace System.Reflection.Emit
 {
-	public abstract class FieldBuilder : FieldInfo
+	public sealed partial class FieldBuilder : System.Reflection.FieldInfo
 	{
-		public override FieldAttributes Attributes {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type DeclaringType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type FieldType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Name {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override object GetValue (object obj)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetConstant (object defaultValue)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetOffset (int iOffset)
-		{
-			throw new PlatformNotSupportedException ();
-		}		
+		internal FieldBuilder() { throw new PlatformNotSupportedException (); } 
+		public override System.Reflection.FieldAttributes Attributes { get { throw null; } }
+		public override System.Type DeclaringType { get { throw null; } }
+		public override System.RuntimeFieldHandle FieldHandle { get { throw null; } }
+		public override System.Type FieldType { get { throw null; } }
+		public override string Name { get { throw null; } }
+		public override System.Type ReflectedType { get { throw null; } }
+		public override object[] GetCustomAttributes(bool inherit) { throw null; }
+		public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw null; }
+		public System.Reflection.Emit.FieldToken GetToken() { throw null; }
+		public override object GetValue(object obj) { throw null; }
+		public override bool IsDefined(System.Type attributeType, bool inherit) { throw null; }
+		public void SetConstant(object defaultValue) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); } 
+		public void SetOffset(int iOffset) { throw new PlatformNotSupportedException (); } 
+		public override void SetValue(object obj, object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); } 
 	}
 }
 

+ 74 - 78
mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.pns.cs

@@ -30,85 +30,81 @@
 
 namespace System.Reflection.Emit
 {
-	public abstract class GenericTypeParameterBuilder : TypeInfo
+	public sealed partial class GenericTypeParameterBuilder : System.Reflection.TypeInfo
 	{
-		public override Assembly Assembly {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string AssemblyQualifiedName {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type BaseType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string FullName {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Guid GUID {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Module Module {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Name {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Namespace {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type GetElementType ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetBaseTypeConstraint (Type baseTypeConstraint)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetGenericParameterAttributes (GenericParameterAttributes genericParameterAttributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetInterfaceConstraints (Type[] interfaceConstraints)
-		{
-			throw new PlatformNotSupportedException ();
-		}	
+		internal GenericTypeParameterBuilder() { throw new PlatformNotSupportedException (); } 
+		public override System.Reflection.Assembly Assembly { get { throw new PlatformNotSupportedException (); } }
+		public override string AssemblyQualifiedName { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type BaseType { get { throw new PlatformNotSupportedException (); } }
+		public override bool ContainsGenericParameters { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.MethodBase DeclaringMethod { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
+		public override string FullName { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.GenericParameterAttributes GenericParameterAttributes { get { throw new PlatformNotSupportedException (); } }
+		public override int GenericParameterPosition { get { throw new PlatformNotSupportedException (); } }
+		public override System.Guid GUID { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsByRefLike { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsConstructedGenericType { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericParameter { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericType { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericTypeDefinition { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSZArray { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsTypeDefinition { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsVariableBoundArray { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
+		public override string Name { get { throw new PlatformNotSupportedException (); } }
+		public override string Namespace { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
+		public override System.RuntimeTypeHandle TypeHandle { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type UnderlyingSystemType { get { throw new PlatformNotSupportedException (); } }
+		public override bool Equals(object o) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(bool inherit) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetElementType() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo[] GetEvents() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetGenericArguments() { throw new PlatformNotSupportedException (); }
+		public override System.Type GetGenericTypeDefinition() { throw new PlatformNotSupportedException (); }
+		public override int GetHashCode() { throw new PlatformNotSupportedException (); }
+		public override System.Type GetInterface(string name, bool ignoreCase) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetInterfaces() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		protected override bool HasElementTypeImpl() { throw new PlatformNotSupportedException (); }
+		public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) { throw new PlatformNotSupportedException (); }
+		protected override bool IsArrayImpl() { throw new PlatformNotSupportedException (); }
+		public override bool IsAssignableFrom(System.Type c) { throw new PlatformNotSupportedException (); }
+		protected override bool IsByRefImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsCOMObjectImpl() { throw new PlatformNotSupportedException (); }
+		public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		protected override bool IsPointerImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsPrimitiveImpl() { throw new PlatformNotSupportedException (); }
+		public override bool IsSubclassOf(System.Type c) { throw new PlatformNotSupportedException (); }
+		protected override bool IsValueTypeImpl() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeArrayType() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeArrayType(int rank) { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeByRefType() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeGenericType(params System.Type[] typeArguments) { throw new PlatformNotSupportedException (); }
+		public override System.Type MakePointerType() { throw new PlatformNotSupportedException (); }
+		public void SetBaseTypeConstraint(System.Type baseTypeConstraint) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); } 
+		public void SetGenericParameterAttributes(System.Reflection.GenericParameterAttributes genericParameterAttributes) { throw new PlatformNotSupportedException (); } 
+		public void SetInterfaceConstraints(params System.Type[] interfaceConstraints) { throw new PlatformNotSupportedException (); } 
+		public override string ToString() { throw new PlatformNotSupportedException (); }
 	}
 }
 

+ 4 - 0
mcs/class/corlib/System.Reflection.Emit/ILGenerator.pns.cs

@@ -28,6 +28,8 @@
 
 #if !MONO_FEATURE_SRE
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection.Emit
 {
 	public class ILGenerator
@@ -183,6 +185,8 @@ namespace System.Reflection.Emit
 			throw new PlatformNotSupportedException ();
 		}
 
+		public virtual void EmitCalli (OpCode opcode, CallingConvention unmanagedCallConv, Type returnType, Type[] parameterTypes) => throw new PlatformNotSupportedException ();
+
 		public virtual void EmitWriteLine (LocalBuilder localBuilder)
 		{
 			throw new PlatformNotSupportedException ();

+ 48 - 75
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.pns.cs

@@ -28,84 +28,57 @@
 
 #if !MONO_FEATURE_SRE
 
+using System;
+using System.Collections.Generic;
+
 namespace System.Reflection.Emit
 {
-	public abstract class MethodBuilder : MethodInfo
+	public sealed partial class MethodBuilder : System.Reflection.MethodInfo
 	{
-		public bool InitLocals { get; set; }
-
-		public override MethodAttributes Attributes {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type DeclaringType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Name {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public GenericTypeParameterBuilder[] DefineGenericParameters (string[] names)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ParameterBuilder DefineParameter (int position, ParameterAttributes attributes, string strParamName)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ILGenerator GetILGenerator ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ILGenerator GetILGenerator (int size)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public override System.Reflection.ParameterInfo[] GetParameters ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetImplementationFlags (MethodImplAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetParameters (Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetReturnType (Type returnType)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetSignature (Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
-		{
-			throw new PlatformNotSupportedException ();
-		}
+		internal MethodBuilder() { throw new PlatformNotSupportedException (); } 
+		public override System.Reflection.MethodAttributes Attributes { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.CallingConventions CallingConvention { get { throw new PlatformNotSupportedException (); } }
+		public override bool ContainsGenericParameters { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
+		public bool InitLocals { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); }  }
+		public override bool IsConstructedGenericMethod { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericMethod { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericMethodDefinition { get { throw new PlatformNotSupportedException (); } }
+		public override System.RuntimeMethodHandle MethodHandle { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
+		public override string Name { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.ParameterInfo ReturnParameter { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type ReturnType { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.ICustomAttributeProvider ReturnTypeCustomAttributes { get { throw new PlatformNotSupportedException (); } }
+		public string Signature { get { throw new PlatformNotSupportedException (); } }
+		public void CreateMethodBody(byte[] il, int count) { throw new PlatformNotSupportedException (); } 
+		public System.Reflection.Emit.GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ParameterBuilder DefineParameter(int position, System.Reflection.ParameterAttributes attributes, string strParamName) { throw new PlatformNotSupportedException (); }
+		public override bool Equals(object obj) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodInfo GetBaseDefinition() { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(bool inherit) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetGenericArguments() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodInfo GetGenericMethodDefinition() { throw new PlatformNotSupportedException (); }
+		public override int GetHashCode() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ILGenerator GetILGenerator() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ILGenerator GetILGenerator(int size) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Module GetModule() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.ParameterInfo[] GetParameters() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodToken GetToken() { throw new PlatformNotSupportedException (); }
+		public override object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
+		public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodInfo MakeGenericMethod(params System.Type[] typeArguments) { throw new PlatformNotSupportedException (); }
+		public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); } 
+		public void SetImplementationFlags(System.Reflection.MethodImplAttributes attributes) { throw new PlatformNotSupportedException (); } 
+		public void SetMethodBody(byte[] il, int maxStack, byte[] localSignature, System.Collections.Generic.IEnumerable<System.Reflection.Emit.ExceptionHandler> exceptionHandlers, System.Collections.Generic.IEnumerable<int> tokenFixups) { throw new PlatformNotSupportedException (); } 
+		public void SetParameters(params System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); } 
+		public void SetReturnType(System.Type returnType) { throw new PlatformNotSupportedException (); } 
+		public void SetSignature(System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) { throw new PlatformNotSupportedException (); } 
+		public override string ToString() { throw new PlatformNotSupportedException (); }
 	}
 }
 

+ 151 - 87
mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.pns.cs

@@ -30,93 +30,157 @@
 
 namespace System.Reflection.Emit
 {
-	public abstract class ModuleBuilder : Module
-	{
-		public void CreateGlobalFunctions ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public EnumBuilder DefineEnum (string name, TypeAttributes visibility, Type underlyingType)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineGlobalMethod (string name, MethodAttributes attributes, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineGlobalMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineGlobalMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineInitializedData (string name, byte[] data, FieldAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name, TypeAttributes attr)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, int typesize)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, PackingSize packsize)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, Type[] interfaces)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, PackingSize packingSize, int typesize)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineUninitializedData (string name, int size, FieldAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodInfo GetArrayMethod (Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-	}
+    public partial class ModuleBuilder : System.Reflection.Module
+    {
+        internal ModuleBuilder() => throw new PlatformNotSupportedException();
+        public override System.Reflection.Assembly Assembly { get { throw new PlatformNotSupportedException(); } }
+        public override string FullyQualifiedName { get { throw new PlatformNotSupportedException(); } }
+        public override string Name { get { throw new PlatformNotSupportedException(); } }
+        public void CreateGlobalFunctions() => throw new PlatformNotSupportedException();
+        public System.Reflection.Emit.EnumBuilder DefineEnum(string name, System.Reflection.TypeAttributes visibility, System.Type underlyingType) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] requiredReturnTypeCustomModifiers, System.Type[] optionalReturnTypeCustomModifiers, System.Type[] parameterTypes, System.Type[][] requiredParameterTypeCustomModifiers, System.Type[][] optionalParameterTypeCustomModifiers) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.FieldBuilder DefineInitializedData(string name, byte[] data, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, int typesize) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packsize) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packingSize, int typesize) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Type[] interfaces) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.FieldBuilder DefineUninitializedData(string name, int size, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException(); }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.MethodInfo GetArrayMethod(System.Type arrayClass, string methodName, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodToken GetArrayMethodToken(System.Type arrayClass, string methodName, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodToken GetConstructorToken(System.Reflection.ConstructorInfo con) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodToken GetConstructorToken(System.Reflection.ConstructorInfo constructor, System.Collections.Generic.IEnumerable<System.Type> optionalParameterTypes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.FieldToken GetFieldToken(System.Reflection.FieldInfo field) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodToken GetMethodToken(System.Reflection.MethodInfo method) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.MethodToken GetMethodToken(System.Reflection.MethodInfo method, System.Collections.Generic.IEnumerable<System.Type> optionalParameterTypes) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.SignatureToken GetSignatureToken(byte[] sigBytes, int sigLength) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.SignatureToken GetSignatureToken(System.Reflection.Emit.SignatureHelper sigHelper) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.StringToken GetStringConstant(string str) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeToken GetTypeToken(string name) { throw new PlatformNotSupportedException(); }
+        public System.Reflection.Emit.TypeToken GetTypeToken(System.Type type) { throw new PlatformNotSupportedException(); }
+        public bool IsTransient() { throw new PlatformNotSupportedException(); }
+        public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) => throw new PlatformNotSupportedException();
+        public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw new PlatformNotSupportedException();
+        public void SetUserEntryPoint(System.Reflection.MethodInfo entryPoint) => throw new PlatformNotSupportedException();
+    }
+
+    public readonly partial struct MethodToken : System.IEquatable<MethodToken>
+    {
+        public static readonly System.Reflection.Emit.MethodToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.MethodToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.MethodToken a, System.Reflection.Emit.MethodToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.MethodToken a, System.Reflection.Emit.MethodToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public readonly partial struct SignatureToken : System.IEquatable<SignatureToken>
+    {
+        public static readonly System.Reflection.Emit.SignatureToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.SignatureToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.SignatureToken a, System.Reflection.Emit.SignatureToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.SignatureToken a, System.Reflection.Emit.SignatureToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public readonly partial struct FieldToken : System.IEquatable<FieldToken>
+    {
+        public static readonly System.Reflection.Emit.FieldToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.FieldToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.FieldToken a, System.Reflection.Emit.FieldToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.FieldToken a, System.Reflection.Emit.FieldToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public readonly partial struct StringToken : System.IEquatable<StringToken>
+    {
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.StringToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.StringToken a, System.Reflection.Emit.StringToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.StringToken a, System.Reflection.Emit.StringToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public readonly partial struct TypeToken : System.IEquatable<TypeToken>
+    {
+        public static readonly System.Reflection.Emit.TypeToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.TypeToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.TypeToken a, System.Reflection.Emit.TypeToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.TypeToken a, System.Reflection.Emit.TypeToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public partial class DynamicILInfo
+    {
+        internal DynamicILInfo() => throw new PlatformNotSupportedException();
+        public System.Reflection.Emit.DynamicMethod DynamicMethod { get { throw new PlatformNotSupportedException(); } }
+        public int GetTokenFor(byte[] signature) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(System.Reflection.Emit.DynamicMethod method) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(System.RuntimeFieldHandle field) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(System.RuntimeFieldHandle field, System.RuntimeTypeHandle contextType) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(System.RuntimeMethodHandle method) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(System.RuntimeMethodHandle method, System.RuntimeTypeHandle contextType) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(System.RuntimeTypeHandle type) { throw new PlatformNotSupportedException(); }
+        public int GetTokenFor(string literal) { throw new PlatformNotSupportedException(); }
+        [System.CLSCompliantAttribute(false)]
+        public unsafe void SetCode(byte* code, int codeSize, int maxStackSize) => throw new PlatformNotSupportedException();
+        public void SetCode(byte[] code, int maxStackSize) => throw new PlatformNotSupportedException();
+        [System.CLSCompliantAttribute(false)]
+        public unsafe void SetExceptions(byte* exceptions, int exceptionsSize) => throw new PlatformNotSupportedException();
+        public void SetExceptions(byte[] exceptions) => throw new PlatformNotSupportedException();
+        [System.CLSCompliantAttribute(false)]
+        public unsafe void SetLocalSignature(byte* localSignature, int signatureSize) => throw new PlatformNotSupportedException();
+        public void SetLocalSignature(byte[] localSignature) => throw new PlatformNotSupportedException();
+    }
+
+    public readonly partial struct EventToken : System.IEquatable<EventToken>
+    {
+        public static readonly System.Reflection.Emit.EventToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.EventToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.EventToken a, System.Reflection.Emit.EventToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.EventToken a, System.Reflection.Emit.EventToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public readonly partial struct ParameterToken : System.IEquatable<ParameterToken>
+    {
+        public static readonly System.Reflection.Emit.ParameterToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.ParameterToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.ParameterToken a, System.Reflection.Emit.ParameterToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.ParameterToken a, System.Reflection.Emit.ParameterToken b) { throw new PlatformNotSupportedException(); }
+    }
+
+    public readonly partial struct PropertyToken : System.IEquatable<PropertyToken>
+    {
+        public static readonly System.Reflection.Emit.PropertyToken Empty;
+        public int Token { get { throw new PlatformNotSupportedException(); } }
+        public override bool Equals(object obj) { throw new PlatformNotSupportedException(); }
+        public bool Equals(System.Reflection.Emit.PropertyToken obj) { throw new PlatformNotSupportedException(); }
+        public override int GetHashCode() { throw new PlatformNotSupportedException(); }
+        public static bool operator ==(System.Reflection.Emit.PropertyToken a, System.Reflection.Emit.PropertyToken b) { throw new PlatformNotSupportedException(); }
+        public static bool operator !=(System.Reflection.Emit.PropertyToken a, System.Reflection.Emit.PropertyToken b) { throw new PlatformNotSupportedException(); }
+    }
 }
 
 #endif

+ 2 - 0
mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.pns.cs

@@ -86,6 +86,8 @@ namespace System.Reflection.Emit
 		{
 			throw new PlatformNotSupportedException ();
 		}
+
+		public virtual ParameterToken GetToken() => throw new PlatformNotSupportedException ();
 	}
 }
 

+ 30 - 73
mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.pns.cs

@@ -30,79 +30,36 @@
 
 namespace System.Reflection.Emit
 {
-	public abstract class PropertyBuilder : PropertyInfo
-	{
-		public override PropertyAttributes Attributes {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override bool CanRead {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override bool CanWrite {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type DeclaringType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Name {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-		
-		public override Type PropertyType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public void AddOtherMethod (MethodBuilder mdBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetConstant (object defaultValue)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetGetMethod (MethodBuilder mdBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetSetMethod (MethodBuilder mdBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public override ParameterInfo[] GetIndexParameters ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-	}
+	public sealed partial class PropertyBuilder : System.Reflection.PropertyInfo
+    {
+        internal PropertyBuilder() { throw new PlatformNotSupportedException (); } 
+        public override System.Reflection.PropertyAttributes Attributes { get { throw new PlatformNotSupportedException (); } }
+        public override bool CanRead { get { throw new PlatformNotSupportedException (); } }
+        public override bool CanWrite { get { throw new PlatformNotSupportedException (); } }
+        public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
+        public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
+        public override string Name { get { throw new PlatformNotSupportedException (); } }
+        public System.Reflection.Emit.PropertyToken PropertyToken { get { throw new PlatformNotSupportedException (); } }
+        public override System.Type PropertyType { get { throw new PlatformNotSupportedException (); } }
+        public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
+        public void AddOtherMethod(System.Reflection.Emit.MethodBuilder mdBuilder) { throw new PlatformNotSupportedException (); } 
+        public override System.Reflection.MethodInfo[] GetAccessors(bool nonPublic) { throw new PlatformNotSupportedException (); }
+        public override object[] GetCustomAttributes(bool inherit) { throw new PlatformNotSupportedException (); }
+        public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+        public override System.Reflection.MethodInfo GetGetMethod(bool nonPublic) { throw new PlatformNotSupportedException (); }
+        public override System.Reflection.ParameterInfo[] GetIndexParameters() { throw new PlatformNotSupportedException (); }
+        public override System.Reflection.MethodInfo GetSetMethod(bool nonPublic) { throw new PlatformNotSupportedException (); }
+        public override object GetValue(object obj, object[] index) { throw new PlatformNotSupportedException (); }
+        public override object GetValue(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
+        public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+        public void SetConstant(object defaultValue) { throw new PlatformNotSupportedException (); } 
+        public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); } 
+        public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); } 
+        public void SetGetMethod(System.Reflection.Emit.MethodBuilder mdBuilder) { throw new PlatformNotSupportedException (); } 
+        public void SetSetMethod(System.Reflection.Emit.MethodBuilder mdBuilder) { throw new PlatformNotSupportedException (); } 
+        public override void SetValue(object obj, object value, object[] index) { throw new PlatformNotSupportedException (); } 
+        public override void SetValue(object obj, object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); } 
+    }
 }
 
 #endif

+ 8 - 0
mcs/class/corlib/System.Reflection.Emit/SignatureHelper.pns.cs

@@ -28,6 +28,8 @@
 
 #if !MONO_FEATURE_SRE
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection.Emit
 {
 	public class SignatureHelper
@@ -110,6 +112,12 @@ namespace System.Reflection.Emit
 		{
 			throw new PlatformNotSupportedException ();
 		}
+
+		public static SignatureHelper GetMethodSigHelper (Module mod, CallingConvention unmanagedCallConv, Type returnType) => 
+			throw new PlatformNotSupportedException ();
+
+		public static SignatureHelper GetMethodSigHelper (CallingConvention unmanagedCallingConvention, Type returnType) =>
+			throw new PlatformNotSupportedException ();
 	}
 }
 

+ 113 - 246
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.pns.cs

@@ -28,256 +28,123 @@
 
 #if !MONO_FEATURE_SRE
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection.Emit
 {
-	public abstract class TypeBuilder : TypeInfo
+	public sealed partial class TypeBuilder : System.Reflection.TypeInfo
 	{
+		internal TypeBuilder() { throw new PlatformNotSupportedException (); } 
 		public const int UnspecifiedTypeSize = 0;
-
-		public PackingSize PackingSize {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public int Size {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Assembly Assembly {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string AssemblyQualifiedName {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Type BaseType {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string FullName {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Guid GUID {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override Module Module {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Name {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public override string Namespace {
-			get {
-				throw new PlatformNotSupportedException ();
-			}
-		}
-
-		public void AddInterfaceImplementation (Type interfaceType)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeInfo CreateTypeInfo ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ConstructorBuilder DefineConstructor (MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ConstructorBuilder DefineConstructor (MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ConstructorBuilder DefineDefaultConstructor (MethodAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public EventBuilder DefineEvent (string name, EventAttributes attributes, Type eventtype)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineField (string fieldName, Type type, FieldAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineField (string fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public GenericTypeParameterBuilder[] DefineGenericParameters (string[] names)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineInitializedData (string name, byte[] data, FieldAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineMethod (string name, MethodAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineMethod (string name, MethodAttributes attributes, CallingConventions callingConvention)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineMethod (string name, MethodAttributes attributes, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public MethodBuilder DefineMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void DefineMethodOverride (MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name, TypeAttributes attr)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, int typeSize)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, PackingSize packSize)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, Type[] interfaces)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, PackingSize packSize, int typeSize)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public ConstructorBuilder DefineTypeInitializer ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public FieldBuilder DefineUninitializedData (string name, int size, FieldAttributes attributes)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public static ConstructorInfo GetConstructor (Type type, ConstructorInfo constructor)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public static FieldInfo GetField (Type type, FieldInfo field)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public static MethodInfo GetMethod (Type type, MethodInfo method)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public bool IsCreated ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetCustomAttribute (ConstructorInfo con, byte[] binaryAttribute)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public void SetParent (Type parent)
-		{
-			throw new PlatformNotSupportedException ();
-		}
-
-		public override Type GetElementType ()
-		{
-			throw new PlatformNotSupportedException ();
-		}
+		public override System.Reflection.Assembly Assembly { get { throw new PlatformNotSupportedException (); } }
+		public override string AssemblyQualifiedName { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type BaseType { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.MethodBase DeclaringMethod { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
+		public override string FullName { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.GenericParameterAttributes GenericParameterAttributes { get { throw new PlatformNotSupportedException (); } }
+		public override int GenericParameterPosition { get { throw new PlatformNotSupportedException (); } }
+		public override System.Guid GUID { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsByRefLike { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsConstructedGenericType { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericParameter { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericType { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsGenericTypeDefinition { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSecurityCritical { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSecuritySafeCritical { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSecurityTransparent { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsSZArray { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsTypeDefinition { get { throw new PlatformNotSupportedException (); } }
+		public override bool IsVariableBoundArray { get { throw new PlatformNotSupportedException (); } }
+		public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
+		public override string Name { get { throw new PlatformNotSupportedException (); } }
+		public override string Namespace { get { throw new PlatformNotSupportedException (); } }
+		public System.Reflection.Emit.PackingSize PackingSize { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
+		public int Size { get { throw new PlatformNotSupportedException (); } }
+		public override System.RuntimeTypeHandle TypeHandle { get { throw new PlatformNotSupportedException (); } }
+		public System.Reflection.Emit.TypeToken TypeToken { get { throw new PlatformNotSupportedException (); } }
+		public override System.Type UnderlyingSystemType { get { throw new PlatformNotSupportedException (); } }
+		public void AddInterfaceImplementation(System.Type interfaceType) { throw new PlatformNotSupportedException (); } 
+		public System.Type CreateType() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.TypeInfo CreateTypeInfo() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[] parameterTypes, System.Type[][] requiredCustomModifiers, System.Type[][] optionalCustomModifiers) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ConstructorBuilder DefineDefaultConstructor(System.Reflection.MethodAttributes attributes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.EventBuilder DefineEvent(string name, System.Reflection.EventAttributes attributes, System.Type eventtype) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.FieldBuilder DefineField(string fieldName, System.Type type, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.FieldBuilder DefineField(string fieldName, System.Type type, System.Type[] requiredCustomModifiers, System.Type[] optionalCustomModifiers, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.FieldBuilder DefineInitializedData(string name, byte[] data, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); }
+		public void DefineMethodOverride(System.Reflection.MethodInfo methodInfoBody, System.Reflection.MethodInfo methodInfoDeclaration) { throw new PlatformNotSupportedException (); } 
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, int typeSize) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packSize) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packSize, int typeSize) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Type[] interfaces) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.ConstructorBuilder DefineTypeInitializer() { throw new PlatformNotSupportedException (); }
+		public System.Reflection.Emit.FieldBuilder DefineUninitializedData(string name, int size, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() { throw new PlatformNotSupportedException (); }
+		public static System.Reflection.ConstructorInfo GetConstructor(System.Type type, System.Reflection.ConstructorInfo constructor) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(bool inherit) { throw new PlatformNotSupportedException (); }
+		public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetElementType() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo[] GetEvents() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public static System.Reflection.FieldInfo GetField(System.Type type, System.Reflection.FieldInfo field) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetGenericArguments() { throw new PlatformNotSupportedException (); }
+		public override System.Type GetGenericTypeDefinition() { throw new PlatformNotSupportedException (); }
+		public override System.Type GetInterface(string name, bool ignoreCase) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetInterfaces() { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public static System.Reflection.MethodInfo GetMethod(System.Type type, System.Reflection.MethodInfo method) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
+		protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException (); }
+		protected override bool HasElementTypeImpl() { throw new PlatformNotSupportedException (); }
+		public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) { throw new PlatformNotSupportedException (); }
+		protected override bool IsArrayImpl() { throw new PlatformNotSupportedException (); }
+		public override bool IsAssignableFrom(System.Type c) { throw new PlatformNotSupportedException (); }
+		protected override bool IsByRefImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsCOMObjectImpl() { throw new PlatformNotSupportedException (); }
+		public bool IsCreated() { throw new PlatformNotSupportedException (); }
+		public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
+		protected override bool IsPointerImpl() { throw new PlatformNotSupportedException (); }
+		protected override bool IsPrimitiveImpl() { throw new PlatformNotSupportedException (); }
+		public override bool IsSubclassOf(System.Type c) { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeArrayType() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeArrayType(int rank) { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeByRefType() { throw new PlatformNotSupportedException (); }
+		public override System.Type MakeGenericType(params System.Type[] typeArguments) { throw new PlatformNotSupportedException (); }
+		public override System.Type MakePointerType() { throw new PlatformNotSupportedException (); }
+		public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); } 
+		public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); } 
+		public void SetParent(System.Type parent) { throw new PlatformNotSupportedException (); } 
+		public override string ToString() { throw new PlatformNotSupportedException (); }
 	}
 }
 

+ 20 - 0
mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs

@@ -195,5 +195,25 @@ namespace System.Runtime.CompilerServices
 			return FormatterServices.GetUninitializedObject (type);
 		}
 #endif
+
+        /// <summary>
+        /// GetSubArray helper method for the compiler to slice an array using a range.
+        /// </summary>
+        public static T[] GetSubArray<T> (T[] array, Range range)
+        {
+            Type elementType = array.GetType ().GetElementType ();
+            Span<T> source = array.AsSpan (range);
+
+            if (elementType.IsValueType)
+            {
+                return source.ToArray ();
+            }
+            else
+            {
+                T[] newArray = (T[]) Array.CreateInstance (elementType, source.Length);
+                source.CopyTo (newArray);
+                return newArray;
+            }
+        }
 	}
 }

+ 8 - 0
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs

@@ -518,6 +518,14 @@ namespace System.Runtime.InteropServices
 
 			return (IntPtr)(-1);
 		}
+#else
+		public static IntPtr GetHINSTANCE (Module m) => throw new PlatformNotSupportedException();
+		public static IntPtr GetIDispatchForObject (object o) => throw new PlatformNotSupportedException();
+		public static object GetTypedObjectForIUnknown (IntPtr pUnk, Type t) => throw new PlatformNotSupportedException();
+		public static bool SetComObjectData (object obj, object key, object data) => throw new PlatformNotSupportedException();
+		public static object GetComObjectData (object obj, object key) => throw new PlatformNotSupportedException();
+		public static string GenerateProgIdForType (Type type) => throw new PlatformNotSupportedException();
+		public static Guid GenerateGuidForType (Type type) => throw new PlatformNotSupportedException();
 #endif // !FULL_AOT_RUNTIME
 
 		public static int GetExceptionCode ()

+ 1 - 1
mcs/class/corlib/System.Threading/Timer.cs

@@ -65,7 +65,7 @@ namespace System.Threading
 
 	[ComVisible (true)]
 	public sealed class Timer
-		: MarshalByRefObject, IDisposable
+		: MarshalByRefObject, IDisposable, IAsyncDisposable
 	{
 		static Scheduler scheduler => Scheduler.Instance;
 #region Timer instance fields

+ 1 - 1
mcs/class/corlib/Test/System/DecimalTest2.cs

@@ -146,7 +146,7 @@ namespace MonoTests.System
         public void TestRemainder()
         {
             Assert.IsTrue ((decimal)Decimal.Remainder(3.6m, 1.3m) == 1.0m);
-            decimal res = 24420760848422211464106753m;
+            decimal res = 24420760848422211464106753.012m;
             decimal remainder = Decimal.Remainder(79228162514264337593543950335m, 27703302467091960609331879.53200m);
             if (AreNotEqual (res, remainder))
                 Assert.AreEqual (res, remainder, "A02");

+ 2 - 0
mcs/class/corlib/corefx/SR.missing.cs

@@ -23,4 +23,6 @@ partial class SR
 	public const string Argument_MemberAndArray = "Cannot supply both a MemberInfo and an Array to indicate the parent of a value type.";
 	public const string Argument_MustSupplyContainer = "When supplying a FieldInfo for fixing up a nested type, a valid ID for that containing object must also be supplied.";
 	public const string Serialization_NoID = "Object has never been assigned an objectID";
+	public const string Arg_SwitchExpressionException = "Non-exhaustive switch expression failed to match its input.";
+	public const string SwitchExpressionException_UnmatchedValue = "Unmatched value was {0}.";
 }

+ 1 - 1
mcs/class/corlib/corefx/Stream.cs

@@ -2,7 +2,7 @@ using System.Threading.Tasks;
 
 namespace System.IO
 {
-    partial class Stream
+    partial class Stream : IAsyncDisposable
     {
         public virtual ValueTask DisposeAsync()
         {

+ 66 - 0
mcs/class/corlib/corefx/SwitchExpressionException.cs

@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.Serialization;
+
+namespace System.Runtime.CompilerServices
+{
+    // MONO: this file was copied from CoreFX master for NS2.1
+
+    /// <summary>
+    /// Indicates that a switch expression that was non-exhaustive failed to match its input
+    /// at runtime, e.g. in the C# 8 expression <code>3 switch { 4 => 5 }</code>.
+    /// The exception optionally contains an object representing the unmatched value.
+    /// </summary>
+    [Serializable]
+    public sealed class SwitchExpressionException : InvalidOperationException
+    {
+        public SwitchExpressionException()
+            : base(SR.Arg_SwitchExpressionException) { }
+
+        public SwitchExpressionException(Exception innerException) :
+            base(SR.Arg_SwitchExpressionException, innerException) { }
+
+        public SwitchExpressionException(object unmatchedValue) : this()
+        {
+            UnmatchedValue = unmatchedValue;
+        }
+
+        private SwitchExpressionException(SerializationInfo info, StreamingContext context)
+            : base(info, context)
+        {
+            UnmatchedValue = info.GetValue(nameof(UnmatchedValue), typeof(object));
+        }
+
+        public SwitchExpressionException(string message) : base(message) { }
+
+        public SwitchExpressionException(string message, Exception innerException)
+            : base(message, innerException) { }
+
+        public object UnmatchedValue { get; }
+
+        public override void GetObjectData(SerializationInfo info, StreamingContext context)
+        {
+            base.GetObjectData(info, context);
+            info.AddValue(nameof(UnmatchedValue), UnmatchedValue, typeof(object));
+        }
+
+        public override string Message
+        {
+            get
+            {
+#if __MonoCS__
+                if (UnmatchedValue == null)
+#else
+                if (UnmatchedValue is null)
+#endif
+                {
+                    return base.Message;
+                }
+                string valueMessage = SR.Format(SR.SwitchExpressionException_UnmatchedValue, UnmatchedValue.ToString());
+                return base.Message + Environment.NewLine + valueMessage;
+            }
+        }
+    }
+}

+ 11 - 0
mcs/class/corlib/corefx/TextWriter.cs

@@ -0,0 +1,11 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.IO
+{
+    // Adds IAsyncDisposable to TextWriter
+    partial class TextWriter : IAsyncDisposable
+    {
+    }
+}

+ 1 - 1
mcs/class/corlib/corert/CancellationTokenRegistration.cs

@@ -7,7 +7,7 @@ using System.Runtime.CompilerServices;
 
 namespace System.Threading
 {
-    partial struct CancellationTokenRegistration
+    partial struct CancellationTokenRegistration : IAsyncDisposable
     {
         public ValueTask DisposeAsync()
         {

Разлика између датотеке није приказан због своје велике величине
+ 389 - 430
mcs/class/corlib/corert/Decimal.DecCalc.cs


Разлика између датотеке није приказан због своје велике величине
+ 241 - 262
mcs/class/corlib/corert/Decimal.cs


+ 2 - 0
mcs/class/corlib/corlib.csproj

@@ -2052,7 +2052,9 @@
     <Compile Include="corefx\SR.cs" />
     <Compile Include="corefx\SR.missing.cs" />
     <Compile Include="corefx\Stream.cs" />
+    <Compile Include="corefx\SwitchExpressionException.cs" />
     <Compile Include="corefx\SynchronizationContext.cs" />
+    <Compile Include="corefx\TextWriter.cs" />
     <Compile Include="corefx\ThrowHelper.cs" />
     <Compile Include="corefx\TimeSpanParse.cs" />
     <Compile Include="corefx\TimeZone.cs" />

+ 2 - 1
mcs/class/corlib/corlib.dll.sources

@@ -1154,6 +1154,7 @@ corefx/Stream.cs
 ../referencesource/mscorlib/system/io/stringwriter.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/IO/TextReader.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/IO/TextWriter.cs
+corefx/TextWriter.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/IO/UnmanagedMemoryAccessor.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStreamWrapper.cs
@@ -1801,7 +1802,7 @@ corert/RuntimeAugments.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs
-
+corefx/SwitchExpressionException.cs
 
 ../../../external/corefx/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs
 ../../../external/corefx/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.Fast.cs

+ 1 - 1
mcs/class/referencesource/mscorlib/system/io/binarywriter.cs

@@ -29,7 +29,7 @@ namespace System.IO {
     //
     [Serializable]
 [System.Runtime.InteropServices.ComVisible(true)]
-    public class BinaryWriter : IDisposable
+    public class BinaryWriter : IDisposable, IAsyncDisposable
     {
         public static readonly BinaryWriter Null = new BinaryWriter();
         

+ 0 - 4
mcs/class/referencesource/mscorlib/system/threading/waithandle.cs

@@ -38,11 +38,7 @@ namespace System.Threading
     using System.Diagnostics.CodeAnalysis;
 
 [System.Runtime.InteropServices.ComVisible(true)]
-#if FEATURE_REMOTING || NETCORE
     public abstract partial class WaitHandle : MarshalByRefObject, IDisposable {
-#else // FEATURE_REMOTING
-    public abstract partial class WaitHandle : IDisposable {
-#endif // FEATURE_REMOTING
         public const int WaitTimeout = 0x102;                    
 
         private const int MAX_WAITHANDLES = 64;

+ 25 - 16
mcs/class/referencesource/mscorlib/system/timezoneinfo.cs

@@ -2073,7 +2073,7 @@ namespace System {
 
                 // As we get the associated rule using the adjusted targetTime, we should use the adjusted year (targetTime.Year) too as after adding the baseOffset, 
                 // sometimes the year value can change if the input datetime was very close to the beginning or the end of the year. Examples of such cases:
-                //      “Libya Standard Time” when used with the date 2011-12-31T23:59:59.9999999Z
+                //      “Libya Standard Time� when used with the date 2011-12-31T23:59:59.9999999Z
                 //      "W. Australia Standard Time" used with date 2005-12-31T23:59:00.0000000Z
                 year = targetTime.Year;
 
@@ -3281,16 +3281,25 @@ namespace System {
 #else
         [TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089")]
 #endif
-        public struct TransitionTime : IEquatable<TransitionTime>, ISerializable, IDeserializationCallback {
+        public readonly struct TransitionTime : IEquatable<TransitionTime>, ISerializable, IDeserializationCallback {
 
             // ---- SECTION:  members supporting exposed properties -------------*
-            private DateTime m_timeOfDay;
-            private byte m_month;
-            private byte m_week;
-            private byte m_day;
-            private DayOfWeek m_dayOfWeek;
-            private Boolean m_isFixedDateRule;
-
+            private readonly DateTime m_timeOfDay;
+            private readonly byte m_month;
+            private readonly byte m_week;
+            private readonly byte m_day;
+            private readonly DayOfWeek m_dayOfWeek;
+            private readonly Boolean m_isFixedDateRule;
+
+            internal TransitionTime(bool isFixedDateRule, DateTime timeOfDay, DayOfWeek dayOfWeek, byte day, byte week, byte month)
+            {
+                m_isFixedDateRule = isFixedDateRule;
+                m_timeOfDay = timeOfDay;
+                m_dayOfWeek = dayOfWeek;
+                m_day = (byte)day;
+                m_week = (byte)week;
+                m_month = (byte)month;
+            }
 
             // ---- SECTION: public properties --------------*
             public DateTime TimeOfDay {
@@ -3417,13 +3426,13 @@ namespace System {
 
                 ValidateTransitionTime(timeOfDay, month, week, day, dayOfWeek);
                 
-                TransitionTime t = new TransitionTime();
-                t.m_isFixedDateRule = isFixedDateRule;
-                t.m_timeOfDay = timeOfDay;
-                t.m_dayOfWeek = dayOfWeek;
-                t.m_day = (byte)day;
-                t.m_week = (byte)week;
-                t.m_month = (byte)month;
+                TransitionTime t = new TransitionTime(
+                    isFixedDateRule,
+                    timeOfDay,
+                    dayOfWeek,
+                    (byte)day,
+                    (byte)week,
+                    (byte)month);
 
                 return t;
             }

Неке датотеке нису приказане због велике количине промена