Ver código fonte

[bcl] Update to match NETStandard 1.6 members

Alexander Köplinger 9 anos atrás
pai
commit
3c3ef17376
95 arquivos alterados com 2050 adições e 519 exclusões
  1. 12 0
      mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs
  2. 4 0
      mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile
  3. 5 4
      mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources
  4. 6 1
      mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs
  5. 29 1
      mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs
  6. 1 1
      mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile
  7. 34 1
      mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs
  8. 3 5
      mcs/class/Facades/System.ServiceModel.Primitives/Makefile
  9. 0 7
      mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources
  10. 5 14
      mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs
  11. 0 72
      mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs
  12. 0 117
      mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs
  13. 0 45
      mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs
  14. 0 43
      mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs
  15. 0 95
      mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs
  16. 4 2
      mcs/class/Facades/subdirs.make
  17. 1 0
      mcs/class/Makefile
  18. 37 0
      mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
  19. 26 0
      mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs
  20. 13 0
      mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs
  21. 1 1
      mcs/class/System.Core/System.IO.Pipes/PipeStream.cs
  22. 5 1
      mcs/class/System.Core/System.Security.Cryptography/ECCurve.cs
  23. 5 1
      mcs/class/System.Core/System.Security.Cryptography/ECParameters.cs
  24. 5 1
      mcs/class/System.Core/System.Security.Cryptography/ECPoint.cs
  25. 5 1
      mcs/class/System.Core/System.Security.Cryptography/IncrementalHash.cs
  26. 5 0
      mcs/class/System.Core/common_System.Core.dll.sources
  27. 286 1
      mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs
  28. 76 0
      mcs/class/System.Data/Microsoft.SqlServer.Server/SqlMetaData.cs
  29. 26 0
      mcs/class/System.Data/System.Data.SqlClient/SqlBulkCopy.cs
  30. 38 0
      mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
  31. 18 0
      mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
  32. 5 0
      mcs/class/System.Data/System.Data.SqlClient/SqlException.cs
  33. 3 0
      mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
  34. 2 0
      mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs
  35. 7 2
      mcs/class/System.IdentityModel/Makefile
  36. 0 2
      mcs/class/System.IdentityModel/System.IdentityModel.Selectors/X509CertificateValidator.cs
  37. 6 0
      mcs/class/System.IdentityModel/mobile_System.IdentityModel.dll.sources
  38. 1 0
      mcs/class/System.IdentityModel/mobile_static_System.IdentityModel.dll.sources
  39. 1 0
      mcs/class/System.IdentityModel/monodroid_System.IdentityModel.dll.sources
  40. 1 0
      mcs/class/System.IdentityModel/monotouch_System.IdentityModel.dll.sources
  41. 1 0
      mcs/class/System.IdentityModel/monotouch_tv_System.IdentityModel.dll.sources
  42. 1 0
      mcs/class/System.IdentityModel/monotouch_watch_System.IdentityModel.dll.sources
  43. 0 0
      mcs/class/System.IdentityModel/net_4_x_System.IdentityModel.dll.sources
  44. 1 0
      mcs/class/System.IdentityModel/xammac_System.IdentityModel.dll.sources
  45. 1 0
      mcs/class/System.IdentityModel/xammac_net_4_5_System.IdentityModel.dll.sources
  46. 73 0
      mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
  47. 86 2
      mcs/class/System.ServiceModel/Dummy_2_1.cs
  48. 86 2
      mcs/class/System.ServiceModel/Dummy_XM_4_5.cs
  49. 2 2
      mcs/class/System.ServiceModel/Makefile
  50. 55 49
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
  51. 7 0
      mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs
  52. 17 15
      mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
  53. 9 1
      mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs
  54. 19 0
      mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs
  55. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs
  56. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs
  57. 1 1
      mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs
  58. 8 0
      mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs
  59. 6 0
      mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources
  60. 1 0
      mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources
  61. 5 0
      mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
  62. 5 0
      mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
  63. 9 1
      mcs/class/System/System.IO/FileSystemWatcher_mobile.cs
  64. 6 0
      mcs/class/System/System.Net.Security/SslStream.cs
  65. 15 0
      mcs/class/System/System.Net.Sockets/Socket.cs
  66. 1 3
      mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
  67. 2 2
      mcs/class/System/System.Net.Sockets/TcpClient.cs
  68. 2 4
      mcs/class/System/System.Net.Sockets/UdpClient.cs
  69. 5 0
      mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs
  70. 5 0
      mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs
  71. 4 1
      mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs
  72. 6 1
      mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs
  73. 123 4
      mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
  74. 3 0
      mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs
  75. 80 0
      mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs
  76. 12 0
      mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
  77. 9 0
      mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs
  78. 13 1
      mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs
  79. 24 4
      mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs
  80. 5 1
      mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
  81. 24 4
      mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs
  82. 12 0
      mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
  83. 177 0
      mcs/class/corlib/System/Console.cs
  84. 14 0
      mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs
  85. 14 0
      mcs/class/referencesource/System.Core/Microsoft/Scripting/Ast/LambdaExpression.cs
  86. 26 0
      mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs
  87. 14 0
      mcs/class/referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs
  88. 199 0
      mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs
  89. 14 0
      mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs
  90. 32 0
      mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs
  91. 28 0
      mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
  92. 28 0
      mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
  93. 11 0
      mcs/class/referencesource/System/net/System/Net/WebHeaderCollection.cs
  94. 56 1
      mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs
  95. 15 0
      mcs/class/referencesource/mscorlib/system/AppContext/AppContext.cs

+ 12 - 0
mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs

@@ -34,6 +34,18 @@ namespace System.Diagnostics
 {
 	public static class StackFrameExtensions
 	{
+		[MonoTODO]
+		public static IntPtr GetNativeImageBase (this StackFrame stackFrame)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static IntPtr GetNativeIP (this StackFrame stackFrame)
+		{
+			throw new NotImplementedException ();
+		}
+
 		[MonoTODO]
 		public static bool HasNativeImage (this StackFrame stackFrame)
 		{

+ 4 - 0
mcs/class/Facades/System.Security.Cryptography.Algorithms/Makefile

@@ -14,6 +14,10 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
 LIB_REFS = System System.Core
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
+ifneq (,$(findstring NETSTANDARD,$(PROFILE_MCS_FLAGS)))
+LIB_MCS_FLAGS += /d:IN_FACADE
+endif
+
 NO_TEST = yes
 
 include $(MCS_BUILD_DIR)/library.make

+ 5 - 4
mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources

@@ -1,6 +1,7 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-ECCurve.cs
-ECPoint.cs
-ECParameters.cs
-IncrementalHash.cs
+
+../../System.Core/System.Security.Cryptography/ECCurve.cs
+../../System.Core/System.Security.Cryptography/ECPoint.cs
+../../System.Core/System.Security.Cryptography/ECParameters.cs
+../../System.Core/System.Security.Cryptography/IncrementalHash.cs

+ 6 - 1
mcs/class/Facades/System.Security.Cryptography.Algorithms/TypeForwarders.cs

@@ -43,4 +43,9 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDES))]
 
-
+#if NETSTANDARD  // we typeforward the types into System.Core if we have the types there
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECCurve))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECPoint))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.IncrementalHash))]
+#endif

+ 29 - 1
mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs

@@ -30,6 +30,31 @@ namespace System.Security.Cryptography
 {
 	public sealed class ECDsaOpenSsl : ECDsa
 	{
+		public ECDsaOpenSsl ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public ECDsaOpenSsl (int keySize)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public ECDsaOpenSsl(IntPtr handle)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public ECDsaOpenSsl (ECCurve curve)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public ECDsaOpenSsl (SafeEvpPKeyHandle pkeyHandle)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public override byte[] SignHash (byte[] hash)
 		{
 			throw new NotImplementedException ();
@@ -40,6 +65,9 @@ namespace System.Security.Cryptography
 			throw new NotImplementedException ();
 		}
 
-		// TODO: Implement full contract API
+		public SafeEvpPKeyHandle DuplicateKeyHandle ()
+		{
+			throw new NotImplementedException ();
+		}
 	}
 }

+ 1 - 1
mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile

@@ -11,7 +11,7 @@ LIBRARY = System.Security.Cryptography.OpenSsl.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System.Core
+LIB_REFS = System.Core Facades/System.Security.Cryptography.Algorithms
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 NO_TEST = yes

+ 34 - 1
mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs

@@ -30,6 +30,36 @@ namespace System.Security.Cryptography
 {
 	public sealed class RSAOpenSsl : RSA
 	{
+		public RSAOpenSsl ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public RSAOpenSsl (int keySize)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public RSAOpenSsl(IntPtr handle)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public RSAOpenSsl (ECCurve curve)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public RSAOpenSsl (RSAParameters parameters)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public RSAOpenSsl (SafeEvpPKeyHandle pkeyHandle)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public override RSAParameters ExportParameters (bool includePrivateParameters)
 		{
 			throw new NotImplementedException ();
@@ -50,6 +80,9 @@ namespace System.Security.Cryptography
 			throw new NotImplementedException ();
 		}
 
-		// TODO: Implement full contract API
+		public SafeEvpPKeyHandle DuplicateKeyHandle ()
+		{
+			throw new NotImplementedException ();
+		}
 	}
 }

+ 3 - 5
mcs/class/Facades/System.ServiceModel.Primitives/Makefile

@@ -11,14 +11,12 @@ LIBRARY = System.ServiceModel.Primitives.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.ServiceModel System.Xml Facades/System.Security.Cryptography.X509Certificates
-
-ifneq (2.1, $(FRAMEWORK_VERSION))
-LIB_REFS += System.IdentityModel
-endif
+LIB_REFS = System System.ServiceModel System.Xml System.IdentityModel Facades/System.Security.Cryptography.X509Certificates
 
 LIB_MCS_FLAGS = $(SIGN_FLAGS) 
 
+PLATFORM_DEBUG_FLAGS =
+
 NO_TEST = yes
 
 include $(MCS_BUILD_DIR)/library.make

+ 0 - 7
mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources

@@ -1,9 +1,2 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-
-../../../build/common/MonoTODOAttribute.cs
-X509ServiceCertificateAuthentication_mobile.cs
-X509CertificateValidator_mobile.cs
-X509CertificateValidationMode_mobile.cs
-X509CertificateRecipientClientCredential_mobile.cs
-X509CertificateInitiatorClientCredential_mobile.cs

+ 5 - 14
mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs

@@ -20,6 +20,7 @@
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IdentityModel.Selectors.X509CertificateValidator))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ActionNotSupportedException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory<>))]
@@ -150,6 +151,10 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityAccessDeniedException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.UserNamePasswordClientCredential))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.WindowsClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509ServiceCertificateAuthentication))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateInitiatorClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateRecipientClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateValidationMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SecurityMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServerTooBusyException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceActivationException))]
@@ -158,17 +163,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TransferMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UnknownMessageReceivedEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
-
-#if !MOBILE && !XAMMAC_4_5
-
-// TODO: These are implemented as stubs in the facade directly on mobile (contrary to Desktop where they're forwarded to System.ServiceModel.dll/System.IdentityModel.dll).
-// I'm not 100% sure this is the right approach, but Marek thinks it's fine so I'm sticking with it for now.
-// The problem on mobile is that types like X509CertificateValidator live in System.IdentityModel.dll which is not built for mobile.
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IdentityModel.Selectors.X509CertificateValidator))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateValidationMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509ServiceCertificateAuthentication))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateInitiatorClientCredential))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.X509CertificateRecipientClientCredential))]
-
-#endif

+ 0 - 72
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs

@@ -1,72 +0,0 @@
-//
-// X509CertificateInitiatorClientCredential_mobile.cs
-//
-// Author:
-//   Alexander Köplinger ([email protected])
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.ServiceModel.Security
-{
-	public sealed class X509CertificateInitiatorClientCredential
-	{
-		[MonoTODO]
-		public X509Certificate2 Certificate
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		internal X509CertificateInitiatorClientCredential()
-		{
-			throw new NotImplementedException ();
-		}
-
-		[MonoTODO]
-		public void SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
-		{
-			throw new NotImplementedException ();
-		}
-
-		[MonoTODO]
-		public void SetCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
-		{
-			throw new NotImplementedException ();
-		}
-	}
-}
-
-#endif

+ 0 - 117
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs

@@ -1,117 +0,0 @@
-//
-// X509CertificateRecipientClientCredential_mobile.cs
-//
-// Author:
-//   Alexander Köplinger ([email protected])
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System;
-using System.Collections.Generic;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.ServiceModel.Security
-{
-	public sealed class X509CertificateRecipientClientCredential
-	{
-		[MonoTODO]
-		public X509ServiceCertificateAuthentication Authentication
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		public X509Certificate2 DefaultCertificate
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		public Dictionary<Uri, X509Certificate2> ScopedCertificates
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		public X509ServiceCertificateAuthentication SslCertificateAuthentication
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		internal X509CertificateRecipientClientCredential ()
-		{
-			throw new NotImplementedException ();
-		}
-
-		[MonoTODO]
-		public void SetDefaultCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
-		{
-			throw new NotImplementedException ();
-		}
-
-		[MonoTODO]
-		public void SetDefaultCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName)
-		{
-			throw new NotImplementedException ();
-		}
-
-		[MonoTODO]
-		public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
-		{
-			throw new NotImplementedException ();
-		}
-
-		[MonoTODO]
-		public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService)
-		{
-			throw new NotImplementedException ();
-		}
-	}
-}
-
-#endif

+ 0 - 45
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs

@@ -1,45 +0,0 @@
-//
-// X509CertificateValidationMode_mobile.cs
-//
-// Author:
-//   Alexander Köplinger ([email protected])
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-namespace System.ServiceModel.Security
-{
-	public enum X509CertificateValidationMode
-	{
-		None,
-		PeerTrust,
-		ChainTrust,
-		PeerOrChainTrust,
-		Custom
-	}
-}
-
-#endif

+ 0 - 43
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs

@@ -1,43 +0,0 @@
-//
-// X509CertificateValidator_mobile.cs
-//
-// Author:
-//   Alexander Köplinger ([email protected])
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.IdentityModel.Selectors
-{
-	public abstract class X509CertificateValidator
-	{
-		public abstract void Validate (X509Certificate2 certificate);
-	}
-}
-
-#endif

+ 0 - 95
mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs

@@ -1,95 +0,0 @@
-//
-// X509ServiceCertificateAuthentication_mobile.cs
-//
-// Author:
-//   Alexander Köplinger ([email protected])
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if MOBILE || XAMMAC_4_5
-
-using System;
-using System.IdentityModel.Selectors;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.ServiceModel.Security
-{
-	public sealed class X509ServiceCertificateAuthentication
-	{
-		[MonoTODO]
-		public X509CertificateValidationMode CertificateValidationMode
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		public X509CertificateValidator CustomCertificateValidator
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		public X509RevocationMode RevocationMode
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-
-		[MonoTODO]
-		public StoreLocation TrustedStoreLocation
-		{
-			get
-			{
-				throw new NotImplementedException ();
-			}
-			set
-			{
-				throw new NotImplementedException ();
-			}
-		}
-	}
-}
-
-#endif

+ 4 - 2
mcs/class/Facades/subdirs.make

@@ -36,7 +36,7 @@ drawing_DEPS_SUBDIRS = System.Drawing.Primitives
 
 reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
 
-monotouch_SUBDIRS = $(common_DEPS_SUBDIRS)
+monotouch_SUBDIRS = $(common_DEPS_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
 monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
 
 mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
@@ -62,6 +62,8 @@ monotouch_tv_SUBDIRS = $(monotouch_SUBDIRS)
 monotouch_tv_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
 mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
-System.Security.Cryptography.Cng System.Security.Cryptography.OpenSsl
+System.Security.Cryptography.Cng
+
+mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.Algorithms System.Security.Cryptography.OpenSsl
 
 PROFILE_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)

+ 1 - 0
mcs/class/Makefile

@@ -29,6 +29,7 @@ mobile_common_dirs := \
 	System.ServiceModel.Internals	\
 	System.Runtime.Serialization	\
 	System.Xml.Linq	\
+	System.IdentityModel		\
 	System.ServiceModel	\
 	System.ServiceModel.Web	\
 	System.Json	\

+ 37 - 0
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs

@@ -182,6 +182,31 @@ namespace System.IO.MemoryMappedFiles
 			};
 		}
 
+		public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
+							       HandleInheritability inheritability,
+							       bool leaveOpen)
+		{
+			if (fileStream == null)
+				throw new ArgumentNullException ("fileStream");
+			if (mapName != null && mapName.Length == 0)
+				throw new ArgumentException ("mapName");
+			if ((!MonoUtil.IsUnix && capacity == 0 && fileStream.Length == 0) || (capacity > fileStream.Length))
+				throw new ArgumentException ("capacity");
+
+			IntPtr handle = MemoryMapImpl.OpenHandle (fileStream.Handle, mapName, out capacity, access, MemoryMappedFileOptions.DelayAllocatePages);
+			
+			MemoryMapImpl.ConfigureHandleInheritability (handle, inheritability);
+				
+			return new MemoryMappedFile () {
+				handle = handle,
+				fileAccess = access,
+				name = mapName,
+				fileCapacity = capacity,
+
+				stream = fileStream,
+				keepOpen = leaveOpen
+			};
+		}
 
 		[MonoLimitation ("memoryMappedFileSecurity is currently ignored")]
 		public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
@@ -242,6 +267,12 @@ namespace System.IO.MemoryMappedFiles
 			return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
 		}
 
+		[MonoLimitation ("Named mappings scope is process local; options is ignored")]
+		public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability)
+		{
+			return CreateNew (mapName, capacity, access, options, null, inheritability);
+		}
+
 		[MonoLimitation ("Named mappings scope is process local; options and memoryMappedFileSecurity are ignored")]
 		public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access,
 							  MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity,
@@ -262,6 +293,12 @@ namespace System.IO.MemoryMappedFiles
 			return CreateOrOpen (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None);
 		}
 
+		[MonoLimitation ("Named mappings scope is process local")]
+		public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability)
+		{
+			return CreateOrOpen (mapName, capacity, access, options, null, inheritability);
+		}
+
 		[MonoLimitation ("Named mappings scope is process local")]
 		public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability)
 		{

+ 26 - 0
mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs

@@ -37,6 +37,8 @@ using System.Security.AccessControl;
 using System.Security.Permissions;
 using System.Security.Principal;
 using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
 using Microsoft.Win32;
 using Microsoft.Win32.SafeHandles;
 
@@ -113,6 +115,10 @@ namespace System.IO.Pipes
 		}
 #endif
 
+		~NamedPipeClientStream () {
+			Dispose (false);
+		}
+		
 		INamedPipeClient impl;
 
 		public void Connect ()
@@ -137,6 +143,26 @@ namespace System.IO.Pipes
 #endif
 		}
 
+		public Task ConnectAsync ()
+		{
+			return ConnectAsync (Timeout.Infinite, CancellationToken.None);
+		}
+
+		public Task ConnectAsync (int timeout)
+		{
+			return ConnectAsync (timeout, CancellationToken.None);
+		}
+
+		public Task ConnectAsync (CancellationToken cancellationToken)
+		{
+			return ConnectAsync (Timeout.Infinite, cancellationToken);
+		}
+
+		public Task ConnectAsync (int timeout, CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public int NumberOfServerInstances {
 			get {
 				CheckPipePropertyOperations ();

+ 13 - 0
mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs

@@ -32,6 +32,8 @@ using Microsoft.Win32.SafeHandles;
 using System;
 using System.IO;
 using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
 using System.Security.AccessControl;
 using System.Security.Permissions;
 using System.Security.Principal;
@@ -153,6 +155,17 @@ namespace System.IO.Pipes
 			IsConnected = true;
 		}
 
+		public Task WaitForConnectionAsync ()
+		{
+			return WaitForConnectionAsync (CancellationToken.None);
+		}
+
+		[MonoTODO]
+		public Task WaitForConnectionAsync (CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
 		[MonoTODO]
 		[SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPrincipal)]
 		public string GetImpersonationUserName ()

+ 1 - 1
mcs/class/System.Core/System.IO.Pipes/PipeStream.cs

@@ -269,13 +269,13 @@ namespace System.IO.Pipes
 				
 			pipeSecurity.Persist (SafePipeHandle);
 		}
+#endif
 
 		// pipe I/O
 
 		public void WaitForPipeDrain ()
 		{
 		}
-#endif
 
 		[MonoTODO]
 		public override int Read ([In] byte [] buffer, int offset, int count)

+ 5 - 1
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs → mcs/class/System.Core/System.Security.Cryptography/ECCurve.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if (NETSTANDARD && !IN_FACADE) || (!NETSTANDARD && IN_FACADE)
+
 namespace System.Security.Cryptography
 {
 	[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
@@ -82,4 +84,6 @@ namespace System.Security.Cryptography
 			public static ECCurve nistP521 { get { throw new NotImplementedException (); } }
 		}
 	}
-}
+}
+
+#endif

+ 5 - 1
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs → mcs/class/System.Core/System.Security.Cryptography/ECParameters.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if (NETSTANDARD && !IN_FACADE) || (!NETSTANDARD && IN_FACADE)
+
 namespace System.Security.Cryptography
 {
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
@@ -36,4 +38,6 @@ namespace System.Security.Cryptography
         public ECPoint Q;
         public void Validate () { throw new NotImplementedException (); }
     }
-}
+}
+
+#endif

+ 5 - 1
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs → mcs/class/System.Core/System.Security.Cryptography/ECPoint.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if (NETSTANDARD && !IN_FACADE) || (!NETSTANDARD && IN_FACADE)
+
 namespace System.Security.Cryptography
 {
 	[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
@@ -34,4 +36,6 @@ namespace System.Security.Cryptography
 		public byte[] X;
 		public byte[] Y;
 	}
-}
+}
+
+#endif

+ 5 - 1
mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs → mcs/class/System.Core/System.Security.Cryptography/IncrementalHash.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NETSTANDARD
+
 namespace System.Security.Cryptography
 {
     public sealed class IncrementalHash : IDisposable
@@ -39,4 +41,6 @@ namespace System.Security.Cryptography
         public void Dispose () { }
         public byte[] GetHashAndReset () { throw new NotImplementedException (); }
     }
-}
+}
+
+#endif

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

@@ -223,3 +223,8 @@ ReferenceSources/Strings.cs
 ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
 
 ../referencesource/System.Core/System/threading/Tasks/TaskExtensions.cs
+
+System.Security.Cryptography/ECCurve.cs
+System.Security.Cryptography/ECPoint.cs
+System.Security.Cryptography/ECParameters.cs
+System.Security.Cryptography/IncrementalHash.cs

+ 286 - 1
mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs

@@ -79,6 +79,11 @@ namespace Microsoft.SqlServer.Server
 			throw new NotImplementedException ();
 		}
 
+		public virtual DateTimeOffset GetDateTimeOffset (int ordinal)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public virtual decimal GetDecimal (int ordinal)
 		{
 			throw new NotImplementedException ();
@@ -89,7 +94,7 @@ namespace Microsoft.SqlServer.Server
 			throw new NotImplementedException ();
 		}
 
-		public virtual System.Type GetFieldType (int ordinal)
+		public virtual Type GetFieldType (int ordinal)
 		{
 			throw new NotImplementedException ();
 		}
@@ -129,11 +134,116 @@ namespace Microsoft.SqlServer.Server
 			throw new NotImplementedException ();
 		}
 
+		public virtual SqlBinary GetSqlBinary (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlBoolean GetSqlBoolean (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlByte GetSqlByte (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlBytes GetSqlBytes (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlChars GetSqlChars (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlDateTime GetSqlDateTime (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlDecimal GetSqlDecimal (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlDouble GetSqlDouble (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual Type GetSqlFieldType (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlGuid GetSqlGuid (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlInt16 GetSqlInt16 (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlInt32 GetSqlInt32 (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlInt64 GetSqlInt64 (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlMetaData GetSqlMetaData (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlMoney GetSqlMoney (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlSingle GetSqlSingle (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlString GetSqlString (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual object GetSqlValue (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual int GetSqlValues (object[] values)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
+		public virtual SqlXml GetSqlXml (int ordinal)
+ 		{
+ 			throw new NotImplementedException ();
+ 		}
+
 		public virtual string GetString (int ordinal)
 		{
 			throw new NotImplementedException ();
 		}
 
+		public virtual TimeSpan GetTimeSpan (int ordinal)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public virtual object GetValue (int ordinal)
 		{
 			throw new NotImplementedException ();
@@ -144,6 +254,181 @@ namespace Microsoft.SqlServer.Server
 			throw new NotImplementedException ();
 		}
 
+		public virtual void SetBoolean (int ordinal, bool value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetByte (int ordinal, byte value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetBytes (int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetChar (int ordinal, char value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetChars (int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetDateTime (int ordinal, DateTime value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetDateTimeOffset (int ordinal, DateTimeOffset value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetDBNull (int ordinal)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetDecimal (int ordinal, decimal value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetDouble (int ordinal, double value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetFloat (int ordinal, float value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetGuid (int ordinal, Guid value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetInt16 (int ordinal, short value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetInt32 (int ordinal, int value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetInt64 (int ordinal, long value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlBinary (int ordinal, SqlBinary value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlBoolean (int ordinal, SqlBoolean value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlByte (int ordinal, SqlByte value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlBytes (int ordinal, SqlBytes value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlChars (int ordinal, SqlChars value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlDateTime (int ordinal, SqlDateTime value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlDecimal (int ordinal, SqlDecimal value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlDouble (int ordinal, SqlDouble value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlGuid (int ordinal, SqlGuid value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlInt16 (int ordinal, SqlInt16 value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlInt32 (int ordinal, SqlInt32 value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlInt64 (int ordinal, SqlInt64 value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlMoney (int ordinal, SqlMoney value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlSingle (int ordinal, SqlSingle value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlString (int ordinal, SqlString value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetSqlXml (int ordinal, SqlXml value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetString (int ordinal, string value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetTimeSpan (int ordinal, TimeSpan value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual void SetValue (int ordinal, object value)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
+		public virtual int SetValues (params object[] values)
+ 		{ 
+			throw new NotImplementedException ();
+ 		}
+
 		public virtual bool IsDBNull (int ordinal)
 		{
 			throw new NotImplementedException ();

+ 76 - 0
mcs/class/System.Data/Microsoft.SqlServer.Server/SqlMetaData.cs

@@ -33,6 +33,7 @@
 
 using System;
 using System.Data;
+using System.Data.SqlClient;
 using System.Threading;
 using System.Data.SqlTypes;
 
@@ -205,6 +206,42 @@ namespace Microsoft.SqlServer.Server {
 			this._sqlDbType = dbType;
 		}
 
+		[MonoTODO]
+		public SqlMetaData (string name, SqlDbType dbType, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public SqlMetaData (string name, SqlDbType dbType, long maxLength, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public SqlMetaData (string name, SqlDbType dbType, byte precision, byte scale, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public SqlMetaData (string name, SqlDbType dbType, long maxLength, long locale, SqlCompareOptions compareOptions, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public SqlMetaData (string name, SqlDbType dbType, string database, string owningSchema, string objectName, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public SqlMetaData (string name, SqlDbType dbType, long maxLength, byte precision, byte scale, long localeId, SqlCompareOptions compareOptions, System.Type userDefinedType, bool useServerDefault, bool isUniqueKey, SortOrder columnSortOrder, int sortOrdinal)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public SqlMetaData (string name, SqlDbType dbType, long maxLength)
 		{
 			if (name == null)
@@ -659,6 +696,25 @@ namespace Microsoft.SqlServer.Server {
 			get { throw new NotImplementedException (); }
 		}
 
+		[MonoTODO]
+		public bool IsUniqueKey {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public SortOrder SortOrder {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public int SortOrdinal {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public bool UseServerDefault {
+			get { throw new NotImplementedException (); }
+		}
 		#endregion // Properties
 
 		#region Methods
@@ -705,6 +761,20 @@ namespace Microsoft.SqlServer.Server {
 			return value;
 		}
 
+		public DateTimeOffset Adjust (DateTimeOffset value)
+		{
+			if (type != typeof (DateTimeOffset))
+				throw new ArgumentException ("Value does not match the SqlMetaData type");
+			return value;
+		}
+
+		public TimeSpan Adjust (TimeSpan value)
+		{
+			if (type != typeof (TimeSpan))
+				throw new ArgumentException ("Value does not match the SqlMetaData type");
+			return value;
+		}
+
 		public decimal Adjust (decimal value)
 		{
 			if (type != typeof (decimal))
@@ -866,6 +936,12 @@ namespace Microsoft.SqlServer.Server {
 			return value;
 		}
 
+		[MonoTODO]
+		public SqlXml Adjust (SqlXml value)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public string Adjust (string value)
 		{
 			if (type != typeof (string))

+ 26 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlBulkCopy.cs

@@ -32,6 +32,8 @@
 using System;
 using System.Data;
 using System.Data.Common;
+using System.Threading;
+using System.Threading.Tasks;
 using Mono.Data.Tds;
 using Mono.Data.Tds.Protocol;
 
@@ -146,6 +148,12 @@ namespace System.Data.SqlClient {
 			set { _destinationTableName = value; }
 		}
 
+		[MonoTODO]
+		public bool EnableStreaming {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
 		public int NotifyAfter {
 			get { return _notifyAfter; }
 			set {
@@ -598,6 +606,24 @@ namespace System.Data.SqlClient {
 			BulkCopyToServer (table, rowState);
 		}
 
+		[MonoTODO]
+		public void WriteToServer (DbDataReader reader)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public Task WriteToServerAsync (DbDataReader reader)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public Task WriteToServerAsync (DbDataReader reader, CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
 		private void RowsCopied (long rowsCopied)
 		{
 			SqlRowsCopiedEventArgs e = new SqlRowsCopiedEventArgs (rowsCopied);

+ 38 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs

@@ -47,6 +47,8 @@ using System.Data.Common;
 using System.Data.Sql;
 using System.Runtime.InteropServices;
 using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
 using System.Xml;
 
 namespace System.Data.SqlClient {
@@ -508,6 +510,42 @@ namespace System.Data.SqlClient {
 			}
 		}
 
+		[MonoTODO]
+		public new Task<SqlDataReader> ExecuteReaderAsync ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public new Task<SqlDataReader> ExecuteReaderAsync (CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public new Task<SqlDataReader> ExecuteReaderAsync (CommandBehavior behavior, CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public Task<XmlReader> ExecuteXmlReaderAsync ()
+		{
+			throw new NotImplementedException ();
+		}
+ 
+		[MonoTODO]
+		public Task<XmlReader> ExecuteXmlReaderAsync (CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public
 		override
 		object ExecuteScalar ()

+ 18 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs

@@ -163,6 +163,13 @@ namespace System.Data.SqlClient
 			}
 		}
 	
+		[MonoTODO]
+		public Guid ClientConnectionId {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
 		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
 		public
 		override
@@ -1663,6 +1670,17 @@ namespace System.Data.SqlClient
 			}
 		}
 
+		[MonoTODO]
+		public void ResetStatistics ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public IDictionary RetrieveStatistics ()
+		{
+			throw new NotImplementedException ();
+		}
 
 		#endregion // Methods
 

+ 5 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlException.cs

@@ -162,6 +162,11 @@ namespace System.Data.SqlClient
 			get { return Errors [0].Class; }
 		}
 
+		[MonoTODO]
+		public Guid ClientConnectionId {
+			get { throw new NotImplementedException (); }
+		}
+
 		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
 		public SqlErrorCollection Errors {
 			get { return errors; }

+ 3 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs

@@ -473,6 +473,9 @@ namespace System.Data.SqlClient {
 		[BrowsableAttribute(false)]
 		public string UdtTypeName { get; set; }
 
+		[BrowsableAttribute(false)]
+		public string TypeName { get; set; }
+
 		#endregion // Properties
 
 		#region Methods

+ 2 - 0
mcs/class/System.IdentityModel/Assembly/AssemblyInfo.cs

@@ -61,4 +61,6 @@ using System.Runtime.InteropServices;
 [assembly: ComCompatibleVersion (1, 0, 3300, 0)]
 [assembly: AllowPartiallyTrustedCallers]
 
+#if !NET_2_1
 [assembly: SecurityCritical (SecurityCriticalScope.Explicit)]
+#endif

+ 7 - 2
mcs/class/System.IdentityModel/Makefile

@@ -3,15 +3,20 @@ SUBDIRS =
 include ../../build/rules.make
 
 LIBRARY = System.IdentityModel.dll
-LIB_REFS = System System.Xml System.Security System.Configuration Mono.Security System.Runtime.Serialization
+LIB_REFS = System System.Xml System.Security Mono.Security System.Runtime.Serialization
 LIB_MCS_FLAGS = \
 		/d:NET_3_0	\
 	        $(OTHER_LIB_MCS_FLAGS)
 
+ifneq (2.1, $(FRAMEWORK_VERSION))
+LIB_REFS += System.Configuration
+endif
+
 ifndef NO_SYSTEM_WEB_DEPENDENCY
+ifneq (2.1, $(FRAMEWORK_VERSION))
 LIB_REFS += System.Web
 endif
-
+endif
 
 ifndef NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))

+ 0 - 2
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/X509CertificateValidator.cs

@@ -27,8 +27,6 @@
 //
 using System;
 using System.Collections.ObjectModel;
-using System.IdentityModel.Policy;
-using System.IdentityModel.Tokens;
 using System.Security.Cryptography.X509Certificates;
 
 namespace System.IdentityModel.Selectors

+ 6 - 0
mcs/class/System.IdentityModel/mobile_System.IdentityModel.dll.sources

@@ -0,0 +1,6 @@
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+
+System.IdentityModel.Selectors/X509CertificateValidator.cs
+System.ServiceModel.Security/X509CertificateValidationMode.cs

+ 1 - 0
mcs/class/System.IdentityModel/mobile_static_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include mobile_System.IdentityModel.dll.sources

+ 1 - 0
mcs/class/System.IdentityModel/monodroid_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include mobile_System.IdentityModel.dll.sources

+ 1 - 0
mcs/class/System.IdentityModel/monotouch_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include mobile_System.IdentityModel.dll.sources

+ 1 - 0
mcs/class/System.IdentityModel/monotouch_tv_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include mobile_System.IdentityModel.dll.sources

+ 1 - 0
mcs/class/System.IdentityModel/monotouch_watch_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include mobile_System.IdentityModel.dll.sources

+ 0 - 0
mcs/class/System.IdentityModel/System.IdentityModel.dll.sources → mcs/class/System.IdentityModel/net_4_x_System.IdentityModel.dll.sources


+ 1 - 0
mcs/class/System.IdentityModel/xammac_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include mobile_System.IdentityModel.dll.sources

+ 1 - 0
mcs/class/System.IdentityModel/xammac_net_4_5_System.IdentityModel.dll.sources

@@ -0,0 +1 @@
+#include net_4_x_System.IdentityModel.dll.sources

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

@@ -26,10 +26,14 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Collections.Generic;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Collections.Specialized;
 using System.Net.Http.Headers;
+using System.Net.Security;
 using System.Linq;
 
 namespace System.Net.Http
@@ -387,5 +391,74 @@ namespace System.Net.Http
 			
 			return CreateResponseMessage (wresponse, request, cancellationToken);
 		}
+
+#if NETSTANDARD
+		public bool CheckCertificateRevocationList {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public X509CertificateCollection ClientCertificates {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public ICredentials DefaultProxyCredentials {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public int MaxConnectionsPerServer {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public int MaxResponseHeadersLength {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public IDictionary<string,object> Properties {
+			get {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public Func<HttpRequestMessage,X509Certificate2,X509Chain,SslPolicyErrors,bool> ServerCertificateCustomValidationCallback {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public SslProtocols SslProtocols {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+#endif
 	}
 }

+ 86 - 2
mcs/class/System.ServiceModel/Dummy_2_1.cs

@@ -7,6 +7,7 @@ using System.ServiceModel.Channels;
 using System.ServiceModel.Dispatcher;
 using System.Text;
 using System.Xml;
+using System.Threading;
 
 namespace System.Runtime.CompilerServices
 {
@@ -22,9 +23,92 @@ namespace System.Runtime.CompilerServices
 namespace System.ServiceModel
 {
 	public class EndpointIdentity {}
-	public class InstanceContext
+	public class InstanceContext : CommunicationObject, IExtensibleObject<InstanceContext>
 	{
-		public InstanceContext (object dummy) {}
+		protected internal override TimeSpan DefaultCloseTimeout
+		{
+			get { throw new NotImplementedException (); }
+		}
+
+		protected internal override TimeSpan DefaultOpenTimeout
+		{
+			get { throw new NotImplementedException (); }
+		}
+
+		IExtensionCollection<InstanceContext> IExtensibleObject<InstanceContext>.Extensions
+		{
+			get { throw new NotImplementedException (); }
+		}
+
+		public SynchronizationContext SynchronizationContext {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public InstanceContext (object implementation)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public object GetServiceInstance (Message message)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnAbort ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnClose (TimeSpan timeout)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnClosed ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnEndClose (IAsyncResult result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnEndOpen (IAsyncResult result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnFaulted ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnOpen (TimeSpan timeout)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnOpened ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnOpening ()
+		{
+			throw new NotImplementedException ();
+		}
 	}
 	// introduced for silverlight sdk compatibility
 	internal class OperationFormatStyleHelper

+ 86 - 2
mcs/class/System.ServiceModel/Dummy_XM_4_5.cs

@@ -6,12 +6,96 @@ using System.ServiceModel.Channels;
 using System.ServiceModel.Dispatcher;
 using System.Text;
 using System.Xml;
+using System.Threading;
 
 namespace System.ServiceModel
 {
-	public class InstanceContext
+	public class InstanceContext : CommunicationObject, IExtensibleObject<InstanceContext>
 	{
-		public InstanceContext (object dummy) {}
+		protected internal override TimeSpan DefaultCloseTimeout
+		{
+			get { throw new NotImplementedException (); }
+		}
+
+		protected internal override TimeSpan DefaultOpenTimeout
+		{
+			get { throw new NotImplementedException (); }
+		}
+
+		IExtensionCollection<InstanceContext> IExtensibleObject<InstanceContext>.Extensions
+		{
+			get { throw new NotImplementedException (); }
+		}
+
+		public SynchronizationContext SynchronizationContext {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public InstanceContext (object implementation)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public object GetServiceInstance (Message message)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnAbort ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnClose (TimeSpan timeout)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnClosed ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnEndClose (IAsyncResult result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnEndOpen (IAsyncResult result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnFaulted ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnOpen (TimeSpan timeout)
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnOpened ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		protected override void OnOpening ()
+		{
+			throw new NotImplementedException ();
+		}
 	}
 }
 

+ 2 - 2
mcs/class/System.ServiceModel/Makefile

@@ -8,7 +8,7 @@ RESOURCE_FILES = \
 
 LIBRARY = System.ServiceModel.dll
 
-LIB_REFS = System System.Xml System.Core System.Runtime.Serialization
+LIB_REFS = System System.Xml System.Core System.Runtime.Serialization System.IdentityModel
 LIB_MCS_FLAGS = \
 		/nowarn:414,169,67,3005,436,219,618 \
 		/unsafe \
@@ -20,7 +20,7 @@ LIB_REFS += System.ServiceModel.Internals
 endif
 
 ifneq (2.1, $(FRAMEWORK_VERSION))
-LIB_REFS += System.Configuration System.Data System.Security System.IdentityModel System.IdentityModel.Selectors System.Transactions System.Messaging System.Web.Services Mono.Security
+LIB_REFS += System.Configuration System.Data System.Security System.IdentityModel.Selectors System.Transactions System.Messaging System.Web.Services Mono.Security
 LIB_MCS_FLAGS += /d:NET_3_0
 
 ifndef NO_SYSTEM_WEB_DEPENDENCY

+ 55 - 49
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs

@@ -34,8 +34,8 @@ using System.ServiceModel.Security;
 using System.ServiceModel.Channels.Security;
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
-using System.ServiceModel.Security.Tokens;
 #endif
+using System.ServiceModel.Security.Tokens;
 using System.Text;
 
 namespace System.ServiceModel.Channels
@@ -44,11 +44,11 @@ namespace System.ServiceModel.Channels
 	{
 		internal SecurityBindingElement ()
 		{
+			MessageSecurityVersion = MessageSecurityVersion.Default;
+			endpoint = new SupportingTokenParameters ();
 #if !NET_2_1 && !XAMMAC_4_5
 			DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
-			MessageSecurityVersion = MessageSecurityVersion.Default;
 			KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy;
-			endpoint = new SupportingTokenParameters ();
 			operation = new Dictionary<string,SupportingTokenParameters> ();
 			opt_endpoint = new SupportingTokenParameters ();
 			opt_operation = new Dictionary<string,SupportingTokenParameters> ();
@@ -60,12 +60,12 @@ namespace System.ServiceModel.Channels
 
 		internal SecurityBindingElement (SecurityBindingElement other)
 		{
-#if !NET_2_1 && !XAMMAC_4_5
-			alg_suite = other.alg_suite;
-			key_entropy_mode = other.key_entropy_mode;
 			security_header_layout = other.security_header_layout;
 			msg_security_version = other.msg_security_version;
 			endpoint = other.endpoint.Clone ();
+#if !NET_2_1 && !XAMMAC_4_5
+			alg_suite = other.alg_suite;
+			key_entropy_mode = other.key_entropy_mode;
 			opt_endpoint = other.opt_endpoint.Clone ();
 			operation = new Dictionary<string,SupportingTokenParameters> ();
 			foreach (KeyValuePair<string,SupportingTokenParameters> p in other.operation)
@@ -79,12 +79,14 @@ namespace System.ServiceModel.Channels
 			LocalClientSettings = other.LocalClientSettings.Clone ();
 		}
 
+		SecurityHeaderLayout security_header_layout;
+		MessageSecurityVersion msg_security_version;
+		SupportingTokenParameters endpoint;
+
 #if !NET_2_1 && !XAMMAC_4_5
 		SecurityAlgorithmSuite alg_suite;
 		SecurityKeyEntropyMode key_entropy_mode;
-		SecurityHeaderLayout security_header_layout;
-		MessageSecurityVersion msg_security_version;
-		SupportingTokenParameters endpoint, opt_endpoint;
+		SupportingTokenParameters opt_endpoint;
 		IDictionary<string,SupportingTokenParameters> operation, opt_operation;
 		LocalServiceSecuritySettings service_settings;
 #endif
@@ -93,6 +95,20 @@ namespace System.ServiceModel.Channels
 
 		public LocalClientSecuritySettings LocalClientSettings { get; private set; }
 
+		public SecurityHeaderLayout SecurityHeaderLayout {
+			get { return security_header_layout; }
+			set { security_header_layout = value; }
+		}
+
+		public MessageSecurityVersion MessageSecurityVersion {
+			get { return msg_security_version; }
+			set { msg_security_version = value; }
+		}
+
+		public SupportingTokenParameters EndpointSupportingTokenParameters {
+			get { return endpoint; }
+		}
+
 #if !NET_2_1 && !XAMMAC_4_5
 		public SecurityAlgorithmSuite DefaultAlgorithmSuite {
 			get { return alg_suite; }
@@ -108,20 +124,6 @@ namespace System.ServiceModel.Channels
 			get { return service_settings; }
 		}
 
-		public SecurityHeaderLayout SecurityHeaderLayout {
-			get { return security_header_layout; }
-			set { security_header_layout = value; }
-		}
-
-		public MessageSecurityVersion MessageSecurityVersion {
-			get { return msg_security_version; }
-			set { msg_security_version = value; }
-		}
-
-		public SupportingTokenParameters EndpointSupportingTokenParameters {
-			get { return endpoint; }
-		}
-
 		public IDictionary<string,SupportingTokenParameters> OperationSupportingTokenParameters {
 			get { return operation; }
 		}
@@ -445,32 +447,6 @@ namespace System.ServiceModel.Channels
 			throw new NotImplementedException ();
 		}
 
-		public static SecurityBindingElement 
-			CreateSecureConversationBindingElement (SecurityBindingElement binding)
-		{
-			return CreateSecureConversationBindingElement (binding, false);
-		}
-
-		public static SecurityBindingElement 
-			CreateSecureConversationBindingElement (
-			SecurityBindingElement binding, bool requireCancellation)
-		{
-			return CreateSecureConversationBindingElement (binding, requireCancellation, null);
-		}
-
-		public static SecurityBindingElement 
-			CreateSecureConversationBindingElement (
-			SecurityBindingElement binding, bool requireCancellation,
-			ChannelProtectionRequirements protectionRequirements)
-		{
-			SymmetricSecurityBindingElement be =
-				new SymmetricSecurityBindingElement ();
-			be.ProtectionTokenParameters =
-				new SecureConversationSecurityTokenParameters (
-					binding, requireCancellation, protectionRequirements);
-			return be;
-		}
-
 		public static SymmetricSecurityBindingElement 
 			CreateSslNegotiationBindingElement (bool requireClientCertificate)
 		{
@@ -554,6 +530,36 @@ namespace System.ServiceModel.Channels
 		}
 #endif
 
+		public static SecurityBindingElement 
+			CreateSecureConversationBindingElement (SecurityBindingElement binding)
+		{
+			return CreateSecureConversationBindingElement (binding, false);
+		}
+
+		public static SecurityBindingElement 
+			CreateSecureConversationBindingElement (
+			SecurityBindingElement binding, bool requireCancellation)
+		{
+			return CreateSecureConversationBindingElement (binding, requireCancellation, null);
+		}
+
+		public static SecurityBindingElement 
+			CreateSecureConversationBindingElement (
+			SecurityBindingElement binding, bool requireCancellation,
+			ChannelProtectionRequirements protectionRequirements)
+		{
+#if !NET_2_1 && !XAMMAC_4_5
+			SymmetricSecurityBindingElement be =
+				new SymmetricSecurityBindingElement ();
+			be.ProtectionTokenParameters =
+				new SecureConversationSecurityTokenParameters (
+					binding, requireCancellation, protectionRequirements);
+			return be;
+#else
+			throw new NotImplementedException ();
+#endif
+		}
+
 		[MonoTODO]
 		public static TransportSecurityBindingElement 
 			CreateUserNameOverTransportBindingElement ()

+ 7 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs

@@ -29,6 +29,7 @@ using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.IO;
 using System.Net.Security;
+using System.Security.Authentication;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Security;
@@ -64,6 +65,12 @@ namespace System.ServiceModel.Channels
 			set { require_client_certificate = value; }
 		}
 
+		[MonoTODO]
+		public SslProtocols SslProtocols {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
 		private SslStreamSecurityBindingElement (
 			SslStreamSecurityBindingElement other)
 			: base (other)

+ 17 - 15
mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs

@@ -54,12 +54,12 @@ namespace System.ServiceModel.Description
 		protected ClientCredentials (ClientCredentials source)
 		{
 			userpass = source.userpass.Clone ();
-#if !NET_2_1
-			issued_token = source.issued_token.Clone ();
 			digest = source.digest.Clone ();
 			initiator = source.initiator.Clone ();
 			recipient = source.recipient.Clone ();
 			windows = source.windows.Clone ();
+#if !NET_2_1
+			issued_token = source.issued_token.Clone ();
 			peer = source.peer.Clone ();
 			support_interactive = source.support_interactive;
 #endif
@@ -67,9 +67,7 @@ namespace System.ServiceModel.Description
 
 		UserNamePasswordClientCredential userpass =
 			new UserNamePasswordClientCredential ();
-#if !NET_2_1
-		IssuedTokenClientCredential issued_token =
-			new IssuedTokenClientCredential ();
+
 		HttpDigestClientCredential digest =
 			new HttpDigestClientCredential ();
 		X509CertificateInitiatorClientCredential initiator =
@@ -78,8 +76,6 @@ namespace System.ServiceModel.Description
 			new X509CertificateRecipientClientCredential ();
 		WindowsClientCredential windows =
 			new WindowsClientCredential ();
-		PeerCredential peer = new PeerCredential ();
-		bool support_interactive = true;
 
 		public X509CertificateInitiatorClientCredential ClientCertificate {
 			get { return initiator; }
@@ -89,6 +85,20 @@ namespace System.ServiceModel.Description
 			get { return digest; }
 		}
 
+		public X509CertificateRecipientClientCredential ServiceCertificate {
+			get { return recipient; }
+		}
+
+		public WindowsClientCredential Windows {
+			get { return windows; }
+		}
+
+#if !NET_2_1
+		IssuedTokenClientCredential issued_token =
+			new IssuedTokenClientCredential ();
+		PeerCredential peer = new PeerCredential ();
+		bool support_interactive = true;
+
 		public IssuedTokenClientCredential IssuedToken {
 			get { return issued_token; }
 		}
@@ -97,18 +107,10 @@ namespace System.ServiceModel.Description
 			get { return peer; }
 		}
 
-		public X509CertificateRecipientClientCredential ServiceCertificate {
-			get { return recipient; }
-		}
-
 		public bool SupportInteractive {
 			get { return support_interactive; }
 			set { support_interactive = value; }
 		}
-
-		public WindowsClientCredential Windows {
-			get { return windows; }
-		}
 #endif
 
 		public UserNamePasswordClientCredential UserName {

+ 9 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs

@@ -31,7 +31,7 @@ using System.Security.Cryptography.X509Certificates;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Configuration;
 using System.ServiceModel.Description;
-using System.ServiceModel.Security.Tokens;
+using System.ServiceModel.Security.Tokens; 
 
 namespace System.ServiceModel.Security
 {
@@ -57,14 +57,22 @@ namespace System.ServiceModel.Security
 			StoreName storeName, X509FindType findType,
 			object findValue)
 		{
+#if !NET_2_1
 			certificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue);
+#else
+			throw new NotImplementedException ();
+#endif
 		}
 
 		public void SetCertificate (
 			string subjectName, StoreLocation storeLocation,
 			StoreName storeName)
 		{
+#if !NET_2_1
 			certificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, X509FindType.FindBySubjectName, subjectName);
+#else
+			throw new NotImplementedException ();
+#endif
 		}
 	}
 }

+ 19 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs

@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !NET_2_1
 using System.IdentityModel.Selectors;
+#endif
 using System.Security.Cryptography.X509Certificates;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Configuration;
@@ -47,7 +49,9 @@ namespace System.ServiceModel.Security
 		X509Certificate2 certificate;
 		Dictionary<Uri,X509Certificate2> scoped =
 			new Dictionary<Uri,X509Certificate2> ();
+#if !NET_2_1
 		X509CertificateValidator validator;
+#endif
 		X509RevocationMode revocation_mode;
 		StoreLocation store_loc;
 
@@ -72,6 +76,13 @@ namespace System.ServiceModel.Security
 			get { return scoped; }
 		}
 
+		[MonoTODO]
+		public X509ServiceCertificateAuthentication SslCertificateAuthentication
+		{
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
 		public void SetDefaultCertificate (string subjectName,
 			StoreLocation storeLocation, StoreName storeName)
 		{
@@ -81,7 +92,11 @@ namespace System.ServiceModel.Security
 		public void SetDefaultCertificate (StoreLocation storeLocation,
 			StoreName storeName, X509FindType findType, Object findValue)
 		{
+#if !NET_2_1
 			DefaultCertificate = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue);
+#else
+			throw new NotImplementedException ();
+#endif
 		}
 
 		public void SetScopedCertificate (string subjectName,
@@ -95,7 +110,11 @@ namespace System.ServiceModel.Security
 			StoreName storeName, X509FindType findType,
 			Object findValue, Uri targetService)
 		{
+#if !NET_2_1
 			ScopedCertificates [targetService] = ConfigUtil.CreateCertificateFrom (storeLocation, storeName, findType, findValue);
+#else
+			throw new NotImplementedException ();
+#endif
 		}
 	}
 }

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs

@@ -37,7 +37,7 @@ namespace System.ServiceModel.Security
 	[MonoTODO]
 	public class X509ServiceCertificateAuthentication
 	{
-		internal X509ServiceCertificateAuthentication ()
+		public X509ServiceCertificateAuthentication ()
 		{
 		}
 

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddressBuilder.cs

@@ -62,12 +62,12 @@ namespace System.ServiceModel
 			set { uri = value; }
 		}
 
-#if !NET_2_1
 		public EndpointIdentity Identity {
 			get { return identity; }
 			set { identity = value; }
 		}
 
+#if !NET_2_1
 		public XmlDictionaryReader GetReaderAtExtensions ()
 		{
 			if (extension == null)

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs

@@ -36,7 +36,7 @@ namespace System.ServiceModel
 #endif
 		MessageCredentialType client_credential_type;
 
-		internal MessageSecurityOverTcp ()
+		public MessageSecurityOverTcp ()
 		{
 #if !MOBILE && !XAMMAC_4_5
 			alg_suite = SecurityAlgorithmSuite.Default;

+ 8 - 0
mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs

@@ -27,6 +27,7 @@
 //
 using System;
 using System.Net.Security;
+using System.Security.Authentication;
 using System.ServiceModel.Security;
 
 namespace System.ServiceModel
@@ -44,5 +45,12 @@ namespace System.ServiceModel
 		public TcpClientCredentialType ClientCredentialType { get; set; }
 
 		public ProtectionLevel ProtectionLevel { get; set; }
+
+		[MonoTODO]
+		public SslProtocols SslProtocols
+		{
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
 	}
 }

+ 6 - 0
mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources

@@ -179,6 +179,9 @@ System.ServiceModel.Security/MessageSecurityException.cs
 System.ServiceModel.Security/SecurityAccessDeniedException.cs
 System.ServiceModel.Security/UserNamePasswordClientCredential.cs
 System.ServiceModel.Security/WindowsClientCredential.cs
+System.ServiceModel.Security/X509CertificateInitiatorClientCredential.cs
+System.ServiceModel.Security/X509CertificateRecipientClientCredential.cs
+System.ServiceModel.Security/X509ServiceCertificateAuthentication.cs
 System.ServiceModel/ActionNotSupportedException.cs
 System.ServiceModel/AllEnums.cs
 System.ServiceModel/HttpBindingBase.cs
@@ -277,8 +280,11 @@ System.ServiceModel/UpnEndpointIdentity.cs
 System.ServiceModel/MessageSecurityVersion.cs
 
 System.ServiceModel.Security/BasicSecurityProfileVersion.cs
+System.ServiceModel.Security/ChannelProtectionRequirements.cs
 System.ServiceModel.Security/SecurityVersion.cs
 System.ServiceModel.Security/TrustVersion.cs
+System.ServiceModel.Security/MessagePartSpecification.cs
+System.ServiceModel.Security/ScopedMessagePartSpecification.cs
 System.ServiceModel.Security/SecureConversationVersion.cs
 System.ServiceModel.Security/SecurityPolicyVersion.cs
 

+ 1 - 0
mcs/class/System.ServiceModel/xammac_net_4_5_System.ServiceModel.dll.sources

@@ -32,6 +32,7 @@ System.ServiceModel.Dispatcher/SeekableXPathNavigator.cs
 System.ServiceModel.Dispatcher/XPathMessageFilter.cs
 System.ServiceModel.Security.Tokens/SecurityContextSecurityToken.cs
 System.ServiceModel.Security.Tokens/SslnegoCookieResolver.cs
+System.ServiceModel.Security.Tokens/SupportingTokenParameters.cs
 System.ServiceModel.Security/ChannelProtectionRequirements.cs
 System.ServiceModel.Security/IdentityVerifier.cs
 System.ServiceModel.Security/IssuedTokenClientCredential.cs

+ 5 - 0
mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs

@@ -39,6 +39,11 @@ namespace System.Diagnostics
 		protected ProcessModuleCollectionBase InnerList {
 			get { return this; }
 		}
+
+		public System.Collections.IEnumerator GetEnumerator ()
+		{
+			return ((System.Collections.IEnumerable)InnerList).GetEnumerator ();
+		}
 	}
 #endif
 

+ 5 - 0
mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs

@@ -45,6 +45,11 @@ namespace System.Diagnostics
 			base.Add (thread);
 			return Count - 1;
 		}
+
+		public System.Collections.IEnumerator GetEnumerator ()
+		{
+			return ((System.Collections.IEnumerable)InnerList).GetEnumerator ();
+		}
 	}
 #endif
 

+ 9 - 1
mcs/class/System/System.IO/FileSystemWatcher_mobile.cs

@@ -28,7 +28,7 @@
 
 namespace System.IO
 {
-    public class FileSystemWatcher
+    public class FileSystemWatcher : IDisposable
     {
         public FileSystemWatcher () { throw new NotImplementedException (); }
         public FileSystemWatcher (string path) { throw new NotImplementedException (); }
@@ -51,5 +51,13 @@ namespace System.IO
         protected void OnRenamed (RenamedEventArgs e) { throw new NotImplementedException (); }
         public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) { throw new NotImplementedException (); }
         public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) { throw new NotImplementedException (); }
+
+        public virtual void Dispose ()
+        {
+        }
+
+        protected virtual void Dispose (bool disposing)
+        {
+        }
     }
 }

+ 6 - 0
mcs/class/System/System.Net.Security/SslStream.cs

@@ -125,6 +125,12 @@ namespace System.Net.Security
 			impl = provider.CreateSslStream (innerStream, leaveInnerStreamOpen, settings);
 		}
 
+		[MonoLimitation ("encryptionPolicy is ignored")]
+		public SslStream (Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy)
+		: this (innerStream, leaveInnerStreamOpen, userCertificateValidationCallback, userCertificateSelectionCallback)
+		{
+		}
+
 		internal SslStream (Stream innerStream, bool leaveInnerStreamOpen, IMonoSslStream impl)
 			: base (innerStream, leaveInnerStreamOpen)
 		{

+ 15 - 0
mcs/class/System/System.Net.Sockets/Socket.cs

@@ -1356,6 +1356,21 @@ namespace System.Net.Sockets
 			return true;
 		}
 
+		public static bool ConnectAsync (SocketType socketType, ProtocolType protocolType, SocketAsyncEventArgs e)
+		{
+			var sock = new Socket (e.RemoteEndPoint.AddressFamily, socketType, protocolType);
+			return sock.ConnectAsync (e);
+		}
+
+		public static void CancelConnectAsync (SocketAsyncEventArgs e)
+		{
+			if (e == null)
+				throw new ArgumentNullException("e");
+
+			if (e.in_progress != 0 && e.LastOperation == SocketAsyncOperation.Connect)
+				e.current_socket.Close();
+		}
+
 		static AsyncCallback ConnectAsyncCallback = new AsyncCallback (ares => {
 			SocketAsyncEventArgs e = (SocketAsyncEventArgs) ((SocketAsyncResult) ares).AsyncState;
 

+ 1 - 3
mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs

@@ -101,7 +101,6 @@ namespace System.Net.Sockets
 			set { remote_ep = value; }
 		}
 
-#if !NET_2_1
 		public IPPacketInformation ReceiveMessageFromPacketInfo {
 			get;
 			private set;
@@ -112,6 +111,7 @@ namespace System.Net.Sockets
 			set;
 		}
 
+#if !NET_2_1
 		public TransmitFileOptions SendPacketsFlags {
 			get;
 			set;
@@ -185,9 +185,7 @@ namespace System.Net.Sockets
 			BufferList = null;
 			RemoteEndPoint = null;
 			UserToken = null;
-#if !NET_2_1
 			SendPacketsElements = null;
-#endif
 		}
 
 		public void Dispose ()

+ 2 - 2
mcs/class/System/System.Net.Sockets/TcpClient.cs

@@ -267,7 +267,7 @@ namespace System.Net.Sockets
 		
 		public void Close ()
 		{
-			((IDisposable) this).Dispose ();
+			Dispose ();
 		}
 
 		public void Connect (IPEndPoint remoteEP)
@@ -382,7 +382,7 @@ namespace System.Net.Sockets
 			return client.BeginConnect (host, port, requestCallback, state);
 		}
 		
-		void IDisposable.Dispose ()
+		public void Dispose ()
 		{
 			Dispose (true);
 			GC.SuppressFinalize (this);

+ 2 - 4
mcs/class/System/System.Net.Sockets/UdpClient.cs

@@ -125,12 +125,10 @@ namespace System.Net.Sockets
 				socket.Bind (localEP);
 		}
 
-#region Close
 		public void Close ()
 		{
-			((IDisposable) this).Dispose ();	
+			Dispose ();
 		}
-#endregion
 #region Connect
 
 		void DoConnect (IPEndPoint endPoint)
@@ -570,7 +568,7 @@ namespace System.Net.Sockets
 
 #endregion
 #region Disposing
-		void IDisposable.Dispose ()
+		public void Dispose ()
 		{
 			Dispose (true);
 			GC.SuppressFinalize (this);

+ 5 - 0
mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs

@@ -50,6 +50,11 @@ namespace System.Security.Authentication.ExtendedProtection
 		{
 			throw new NotImplementedException ();
 		}
+
+		public bool Contains (string searchServiceName)
+		{
+			throw new NotImplementedException ();
+		}
 	}
 }
 

+ 5 - 0
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs

@@ -37,6 +37,7 @@ using MX = MonoSecurity::Mono.Security.X509;
 using MX = Mono.Security.X509;
 #endif
 
+using Microsoft.Win32.SafeHandles;
 using System.Collections;
 using System.Text;
 
@@ -113,6 +114,10 @@ namespace System.Security.Cryptography.X509Certificates {
 			get { return Impl.ChainStatus; }
 		}
 
+		public SafeX509ChainHandle SafeHandle {
+			get { throw new NotImplementedException (); }
+		}
+
 		// methods
 
 		[MonoTODO ("Not totally RFC3280 compliant, but neither is MS implementation...")]

+ 4 - 1
mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs

@@ -53,7 +53,10 @@ namespace System.Security.Cryptography.X509Certificates {
 		CtlNotSignatureValid = 262144,
 		CtlNotValidForUsage = 524288,
 		OfflineRevocation = 16777216,
-		NoIssuanceChainPolicy = 33554432
+		NoIssuanceChainPolicy = 33554432,
+		ExplicitDistrust = 67108864,
+		HasNotSupportedCriticalExtension = 134217728,
+		HasWeakSignature = 1048576,
 	}
 }
 

+ 6 - 1
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs

@@ -40,7 +40,7 @@ using System.Security.Permissions;
 
 namespace System.Security.Cryptography.X509Certificates {
 
-	public sealed class X509Store {
+	public sealed class X509Store : IDisposable {
 
 		private string _name;
 		private StoreLocation _location;
@@ -208,6 +208,11 @@ namespace System.Security.Cryptography.X509Certificates {
 				list.Clear ();
 		}
 
+		public void Dispose ()
+		{
+			Close ();
+		}
+
 		public void Open (OpenFlags flags)
 		{
 			if (String.IsNullOrEmpty (_name))

+ 123 - 4
mcs/class/corlib/Microsoft.Win32/RegistryKey.cs

@@ -60,12 +60,90 @@ namespace Microsoft.Win32
 			throw new PlatformNotSupportedException ();
 		}
 
+		public RegistryKey CreateSubKey (String subkey, bool writable)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public RegistryKey CreateSubKey (String subkey, bool writable, RegistryOptions options)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public void DeleteSubKey (string subkey)
+		{
+		}
+
+		public void DeleteSubKey (string subkey, bool throwOnMissingSubKey)
+		{
+		}
+
+		public void DeleteSubKeyTree (string subkey)
+		{
+		}
+
+		public void DeleteSubKeyTree (string subkey, bool throwOnMissingSubKey)
+		{
+		}
+
+		public void DeleteValue (string name)
+		{
+		}
+
+		public void DeleteValue (string name, bool throwOnMissingValue)
+		{
+		}
+
+		public void Flush()
+		{
+		}
+
+		public static RegistryKey FromHandle (SafeRegistryHandle handle)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public static RegistryKey FromHandle (SafeRegistryHandle handle, RegistryView view)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public string[] GetSubKeyNames ()
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public object GetValue (string name)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
 		public object GetValue (string name, object defaultValue)
 		{
 			throw new PlatformNotSupportedException ();
 		}
 
-		public static object GetValue (string keyName, string valueName, object defaultValue)
+		public object GetValue (string name, object defaultValue, RegistryValueOptions options)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public RegistryValueKind GetValueKind (string name)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public string[] GetValueNames ()
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public static RegistryKey OpenBaseKey (RegistryHive hKey, RegistryView view)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
+		public RegistryKey OpenSubKey (string name)
 		{
 			throw new PlatformNotSupportedException ();
 		}
@@ -75,6 +153,11 @@ namespace Microsoft.Win32
 			throw new PlatformNotSupportedException ();
 		}
 
+		public RegistryKey OpenSubKey (string name, RegistryRights rights)
+		{
+			throw new PlatformNotSupportedException ();
+		}
+
 		public void SetValue (string name, object value)
 		{
 		}
@@ -83,7 +166,25 @@ namespace Microsoft.Win32
 		{
 		}
 
-		// TODO: Finish full contract API
+		public SafeRegistryHandle Handle {
+			get { throw new PlatformNotSupportedException (); }
+		}
+
+		public string Name {
+			get { throw new PlatformNotSupportedException (); }
+		}
+
+		public int SubKeyCount {
+			get { throw new PlatformNotSupportedException (); }
+		}
+
+		public int ValueCount {
+			get { throw new PlatformNotSupportedException (); }
+		}
+
+		public RegistryView View {
+			get { throw new PlatformNotSupportedException (); }
+		}
 	}
 #else
 	/// <summary>
@@ -389,7 +490,18 @@ namespace Microsoft.Win32
 			return CreateSubKey (subkey, permissionCheck, registryOptions);
 		}
 
-		
+		[ComVisible(false)]
+		public RegistryKey CreateSubKey (string subkey, bool writable)
+		{
+			return CreateSubKey (subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree);
+		}
+
+		[ComVisible(false)]
+		public RegistryKey CreateSubKey (string subkey, bool writable, RegistryOptions options)
+		{
+			return CreateSubKey (subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, options);
+		}
+
 		/// <summary>
 		///	Delete the specified subkey.
 		/// </summary>
@@ -589,7 +701,14 @@ namespace Microsoft.Win32
 		{
 			return OpenSubKey (name, permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree);
 		}
-		
+
+		[ComVisible (false)]
+		[MonoLimitation ("rights are ignored in Mono")]
+		public RegistryKey OpenSubKey (string name, RegistryRights rights)
+		{
+			return OpenSubKey (name);
+		}
+
 		[ComVisible (false)]
 		[MonoLimitation ("rights are ignored in Mono")]
 		public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)

+ 3 - 0
mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs

@@ -41,12 +41,15 @@ namespace System.Diagnostics.Tracing
 			get; private set;
 		}
 
+		public EventActivityOptions ActivityOptions { get; set; }
 		public EventLevel Level { get; set; }
 		public EventKeywords Keywords { get; set; }
 		public EventOpcode Opcode { get; set; }
 		public EventChannel Channel { get; set; }
 		public string Message { get; set; }
 		public EventTask Task { get; set; }
+		public EventTags Tags { get; set; }
+		public byte Version { get; set; }
 	}
 }
 

+ 80 - 0
mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs

@@ -28,6 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Collections.Generic;
 
 namespace System.Diagnostics.Tracing
 {
@@ -76,6 +77,11 @@ namespace System.Diagnostics.Tracing
 		{
 		}
 
+		~EventSource ()
+		{
+			Dispose (false);
+		}
+
 		public Exception ConstructionException
 		{
 			get { return null; }
@@ -121,6 +127,7 @@ namespace System.Diagnostics.Tracing
 		public void Dispose ()
 		{
 			Dispose (true);
+			GC.SuppressFinalize (this);
 		}
 
 		public string GetTrait (string key)
@@ -132,6 +139,10 @@ namespace System.Diagnostics.Tracing
 		{
 		}
 
+		public void Write (string eventName, EventSourceOptions options)
+		{
+		}
+
 		public void Write<T> (string eventName, T data)
 		{
 		}
@@ -244,6 +255,75 @@ namespace System.Diagnostics.Tracing
 		{
 			WriteEvent (eventId, new object[] { arg1, arg2, arg3 } );
 		}
+
+		protected unsafe void WriteEventCore (int eventId, int eventDataCount, EventData* data)
+		{
+		}
+
+		protected unsafe void WriteEventWithRelatedActivityId (int eventId, Guid relatedActivityId, params object[] args)
+		{
+		}
+
+		protected unsafe void WriteEventWithRelatedActivityIdCore (int eventId, Guid* relatedActivityId, int eventDataCount, EventSource.EventData* data)
+		{
+		}
+
+#if NETSTANDARD
+		[MonoTODO]
+		public event EventHandler<EventCommandEventArgs> EventCommandExecuted
+		{
+			add { throw new NotImplementedException (); }
+			remove { throw new NotImplementedException (); }
+		}
+#endif
+
+		[MonoTODO]
+		public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest, EventManifestOptions flags)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static Guid GetGuid (Type eventSourceType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static string GetName (Type eventSourceType)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static IEnumerable<EventSource> GetSources ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static void SendCommand (EventSource eventSource, EventCommand command, IDictionary<string, string> commandArguments)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static void SetCurrentThreadActivityId (Guid activityId)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static void SetCurrentThreadActivityId (Guid activityId, out Guid oldActivityThatWillContinue)
+		{
+			throw new NotImplementedException ();
+		}
 	}
 }
 

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

@@ -68,6 +68,12 @@ namespace System.Runtime.InteropServices
 #endif
 		}
 
+		[MonoTODO]
+		public static bool AreComObjectsAvailableForCleanup ()
+		{
+			return false;
+		}
+
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
 		public extern static IntPtr AllocCoTaskMem (int cb);
 
@@ -341,6 +347,12 @@ namespace System.Runtime.InteropServices
 #endif
 		}
 
+		[MonoTODO]
+		public static IntPtr GetComInterfaceForObject (object o, Type T, CustomQueryInterfaceMode mode)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public static IntPtr GetComInterfaceForObject<T, TInterface> (T o) {
 			return GetComInterfaceForObject ((object)o, typeof (T));
 		}

+ 9 - 0
mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs

@@ -33,11 +33,20 @@ namespace System.Security.AccessControl
 {
 	public sealed class AuthorizationRuleCollection : ReadOnlyCollectionBase
 	{
+		public AuthorizationRuleCollection ()
+		{
+		}
+
 		internal AuthorizationRuleCollection (AuthorizationRule [] rules)
 		{
 			InnerList.AddRange (rules);
 		}
 
+		public void AddRule (AuthorizationRule rule)
+		{
+			InnerList.Add (rule);
+		}
+
 		public AuthorizationRule this [int index] {
 			get { return (AuthorizationRule) InnerList [index]; }
 		}

+ 13 - 1
mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs

@@ -216,7 +216,19 @@ namespace System.Security.AccessControl
 			if (!preserveInheritance && SystemAcl != null)
 				SystemAcl.RemoveInheritedAces ();
 		}
-		
+
+		public void AddDiscretionaryAcl (byte revision, int trusted)
+		{
+			DiscretionaryAcl = new DiscretionaryAcl (IsContainer, IsDS, revision, trusted);
+			flags |= ControlFlags.DiscretionaryAclPresent;
+		}
+
+		public void AddSystemAcl(byte revision, int trusted)
+		{
+			SystemAcl = new SystemAcl (IsContainer, IsDS, revision, trusted);
+			flags |= ControlFlags.SystemAclPresent;
+		}
+
 		void CheckAclConsistency (CommonAcl acl)
 		{
 			if (IsContainer != acl.IsContainer)

+ 24 - 4
mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs

@@ -71,7 +71,12 @@ namespace System.Security.AccessControl
 				inheritanceFlags, propagationFlags, AuditFlags.None,
 				objectFlags, objectType, inheritedObjectType);
 		}
-		
+
+		public void AddAccess (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+		{
+			AddAccess (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		[MonoTODO]
 		public bool RemoveAccess (AccessControlType accessType,
 					  SecurityIdentifier sid,
@@ -94,7 +99,12 @@ namespace System.Security.AccessControl
 		{
 			throw new NotImplementedException ();
 		}
-		
+
+		public bool RemoveAccess (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+		{
+			return RemoveAccess (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		public void RemoveAccessSpecific (AccessControlType accessType,
 						  SecurityIdentifier sid,
 						  int accessMask,
@@ -118,7 +128,12 @@ namespace System.Security.AccessControl
 					   inheritanceFlags, propagationFlags, AuditFlags.None,
 					   objectFlags, objectType, inheritedObjectType);
 		}
-		
+
+		public void RemoveAccessSpecific (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+		{
+			RemoveAccessSpecific (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		public void SetAccess (AccessControlType accessType,
 				       SecurityIdentifier sid,
 				       int accessMask,
@@ -142,7 +157,12 @@ namespace System.Security.AccessControl
 				inheritanceFlags, propagationFlags, AuditFlags.None,
 				objectFlags, objectType, inheritedObjectType);
 		}
-		
+
+		public void SetAccess (AccessControlType accessType, SecurityIdentifier sid, ObjectAccessRule rule)
+		{
+			SetAccess (accessType, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		internal override void ApplyCanonicalSortToExplicitAces ()
 		{
 			int explicitCount = GetCanonicalExplicitAceCount ();

+ 5 - 1
mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs

@@ -39,7 +39,11 @@ namespace System.Security.AccessControl
 {
 	public abstract class ObjectSecurity
 	{
-		internal ObjectSecurity (CommonSecurityDescriptor securityDescriptor)
+		protected ObjectSecurity ()
+		{
+		}
+
+		protected ObjectSecurity (CommonSecurityDescriptor securityDescriptor)
 		{
 			if (securityDescriptor == null)
 				throw new ArgumentNullException ("securityDescriptor");

+ 24 - 4
mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs

@@ -71,7 +71,12 @@ namespace System.Security.AccessControl
 				inheritanceFlags, propagationFlags, auditFlags,
 				objectFlags, objectType, inheritedObjectType);
 		}
-		
+
+		public void AddAudit (SecurityIdentifier sid, ObjectAuditRule rule)
+		{
+			AddAudit (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		[MonoTODO]
 		public bool RemoveAudit (AuditFlags auditFlags,
 					 SecurityIdentifier sid,
@@ -94,7 +99,12 @@ namespace System.Security.AccessControl
 		{
 			throw new NotImplementedException ();
 		}
-		
+
+		public bool RemoveAudit (SecurityIdentifier sid, ObjectAuditRule rule)
+		{
+			return RemoveAudit (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		public void RemoveAuditSpecific (AuditFlags auditFlags,
 						 SecurityIdentifier sid,
 						 int accessMask,
@@ -120,7 +130,12 @@ namespace System.Security.AccessControl
 					   objectFlags, objectType, inheritedObjectType);
 
 		}
-		
+
+		public void RemoveAuditSpecific (SecurityIdentifier sid, ObjectAuditRule rule)
+		{
+			RemoveAuditSpecific (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		public void SetAudit (AuditFlags auditFlags,
 				      SecurityIdentifier sid,
 				      int accessMask,
@@ -144,7 +159,12 @@ namespace System.Security.AccessControl
 				inheritanceFlags, propagationFlags, auditFlags,
 				objectFlags, objectType, inheritedObjectType);
 		}
-		
+
+		public void SetAudit (SecurityIdentifier sid, ObjectAuditRule rule)
+		{
+			SetAudit (rule.AuditFlags, sid, rule.AccessMask, rule.InheritanceFlags, rule.PropagationFlags, rule.ObjectFlags, rule.ObjectType, rule.InheritedObjectType);
+		}
+
 		internal override void ApplyCanonicalSortToExplicitAces ()
 		{
 			int explicitCount = GetCanonicalExplicitAceCount ();

+ 12 - 0
mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs

@@ -183,6 +183,18 @@ namespace System.Security.Principal {
 			return new WindowsImpersonationContext (userToken);
 		}
 
+		[SecuritySafeCritical]
+		public static void RunImpersonated (SafeAccessTokenHandle safeAccessTokenHandle, Action action)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[SecuritySafeCritical]
+		public static T RunImpersonated<T> (SafeAccessTokenHandle safeAccessTokenHandle, Func<T> func)
+		{
+			throw new NotImplementedException ();
+		}
+
 		// properties
 		sealed override
 		public string AuthenticationType {

+ 177 - 0
mcs/class/corlib/System/Console.cs

@@ -782,6 +782,183 @@ namespace System
 			if (exit)
 				Environment.Exit (58);
 		}
+#else
+		// largely inspired by https://github.com/dotnet/corefx/blob/be8d2ce3964968cec9322a64211e37682085db70/src/System.Console/src/System/ConsolePal.WinRT.cs, because it's a similar platform where a console might not be available
+
+		// provide simply color tracking that allows round-tripping
+		internal const ConsoleColor UnknownColor = (ConsoleColor)(-1);
+		private static ConsoleColor s_trackedForegroundColor = UnknownColor;
+		private static ConsoleColor s_trackedBackgroundColor = UnknownColor;
+
+		public static ConsoleColor ForegroundColor
+		{
+			get
+			{
+				return s_trackedForegroundColor;
+			}
+			set
+			{
+				lock (Console.Out) // synchronize with other writers
+				{
+					s_trackedForegroundColor = value;
+				}
+			}
+		}
+
+		public static ConsoleColor BackgroundColor
+		{
+			get
+			{
+				return s_trackedBackgroundColor;
+			}
+			set
+			{
+				lock (Console.Out) // synchronize with other writers
+				{
+					s_trackedBackgroundColor = value;
+				}
+			}
+		}
+
+		public static int BufferWidth
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int BufferHeight
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static bool CapsLock { get { throw new PlatformNotSupportedException (); } }
+
+		public static int CursorLeft
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int CursorTop
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int CursorSize
+		{
+			get { return 100; }
+			set { throw new PlatformNotSupportedException(); }
+		}
+
+		public static bool CursorVisible
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static bool KeyAvailable { get { throw new PlatformNotSupportedException (); } }
+
+		public static int LargestWindowWidth
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int LargestWindowHeight
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static bool NumberLock { get { throw new PlatformNotSupportedException (); } }
+
+		public static string Title
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static bool TreatControlCAsInput
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int WindowHeight
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int WindowLeft
+		{
+			get { return 0; }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int WindowTop
+		{
+			get { return 0; }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static int WindowWidth
+		{
+			get { throw new PlatformNotSupportedException (); }
+			set { throw new PlatformNotSupportedException (); }
+		}
+
+		public static bool IsErrorRedirected { get { throw new PlatformNotSupportedException (); } }
+
+		public static bool IsInputRedirected { get { throw new PlatformNotSupportedException (); } }
+
+		public static bool IsOutputRedirected { get { throw new PlatformNotSupportedException (); } }
+
+		public static void Beep () { throw new PlatformNotSupportedException (); }
+
+		public static void Beep (int frequency, int duration) { throw new PlatformNotSupportedException (); }
+
+		public static void Clear () { throw new PlatformNotSupportedException (); }
+
+		public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) { throw new PlatformNotSupportedException(); }
+
+		public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor) { throw new PlatformNotSupportedException(); }
+
+
+		public static ConsoleKeyInfo ReadKey ()
+		{
+			return ReadKey (false);
+		}
+
+		public static ConsoleKeyInfo ReadKey (bool intercept) { throw new PlatformNotSupportedException (); }
+
+		public static void ResetColor ()
+		{
+			lock (Console.Out) // synchronize with other writers
+			{
+				s_trackedForegroundColor = UnknownColor;
+				s_trackedBackgroundColor = UnknownColor;
+			}
+		}
+
+		public static void SetBufferSize (int width, int height) { throw new PlatformNotSupportedException (); }
+
+		public static void SetCursorPosition (int left, int top) { throw new PlatformNotSupportedException (); }
+
+		public static void SetWindowPosition (int left, int top) { throw new PlatformNotSupportedException (); }
+
+		public static void SetWindowSize (int width, int height) { throw new PlatformNotSupportedException (); }
+
+		public static event ConsoleCancelEventHandler CancelKeyPress {
+			add {
+				throw new PlatformNotSupportedException ();
+			}
+			remove {
+				throw new PlatformNotSupportedException ();
+			}
+		}
 #endif
 	}
 }

+ 14 - 0
mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs

@@ -137,6 +137,13 @@ namespace System.Linq.Expressions {
             return LambdaCompiler.Compile(this, debugInfoGenerator);
         }
 
+#if NETSTANDARD
+        public Delegate Compile(bool preferInterpretation) {
+            // TODO: add logic for preferInterpretation
+            return Compile();
+        }
+#endif
+
 #if FEATURE_REFEMIT
         /// <summary>
         /// Compiles the lambda into a method definition.
@@ -198,6 +205,13 @@ namespace System.Linq.Expressions {
             return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator);
         }
 
+#if NETSTANDARD
+        public new TDelegate Compile(bool preferInterpretation) {
+            // TODO: add logic for preferInterpretation
+            return Compile();
+        }
+#endif
+
         /// <summary>
         /// Creates a new expression that is like this one, but using the
         /// supplied children. If all of the children are the same, it will

+ 14 - 0
mcs/class/referencesource/System.Core/Microsoft/Scripting/Ast/LambdaExpression.cs

@@ -139,6 +139,13 @@ namespace System.Linq.Expressions {
             return LambdaCompiler.Compile(this, debugInfoGenerator);
         }
 
+#if NETSTANDARD
+        public Delegate Compile(bool preferInterpretation) {
+            // TODO: add logic for preferInterpretation
+            return Compile();
+        }
+#endif
+
         /// <summary>
         /// Compiles the lambda into a method definition.
         /// </summary>
@@ -200,6 +207,13 @@ namespace System.Linq.Expressions {
             return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator);
         }
 
+#if NETSTANDARD
+        public new TDelegate Compile(bool preferInterpretation) {
+            // TODO: add logic for preferInterpretation
+            return Compile();
+        }
+#endif
+
         /// <summary>
         /// Creates a new expression that is like this one, but using the
         /// supplied children. If all of the children are the same, it will

+ 26 - 0
mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs

@@ -694,6 +694,32 @@ namespace System.Linq
             foreach (TSource element in second) yield return element;
         }
 
+#if NETSTANDARD
+        public static IEnumerable<TSource> Append<TSource>(this IEnumerable<TSource> source, TSource element)
+        {
+            if (source == null) throw Error.ArgumentNull("source");
+            return AppendIterator<TSource>(source, element);
+        }
+
+        private static IEnumerable<TSource> AppendIterator<TSource>(IEnumerable<TSource> source, TSource element)
+        {
+            foreach (TSource e1 in source) yield return e1;
+            yield return element;
+        }
+
+        public static IEnumerable<TSource> Prepend<TSource>(this IEnumerable<TSource> source, TSource element)
+        {
+            if (source == null) throw Error.ArgumentNull("source");
+            return PrependIterator<TSource>(source, element);
+        }
+
+        private static IEnumerable<TSource> PrependIterator<TSource>(IEnumerable<TSource> source, TSource element)
+        {
+            yield return element;
+            foreach (TSource e1 in source) yield return e1;
+        }
+#endif
+
         public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) {
             if (first == null) throw Error.ArgumentNull("first");
             if (second == null) throw Error.ArgumentNull("second");

+ 14 - 0
mcs/class/referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs

@@ -241,5 +241,19 @@ namespace System.Security.Cryptography {
                 return s_sha512;
             }
         }
+
+#if NETSTANDARD
+        public static CngAlgorithm ECDiffieHellman {
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public static CngAlgorithm ECDsa {
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+#endif
     }
 }

+ 199 - 0
mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs

@@ -32,7 +32,206 @@ namespace System.Security.Cryptography {
     [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
     public sealed class CngKey : IDisposable {
 #if MONO
+        public CngAlgorithmGroup AlgorithmGroup {
+            [SecuritySafeCritical]
+            [Pure]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public CngAlgorithm Algorithm {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public CngExportPolicies ExportPolicy {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public SafeNCryptKeyHandle Handle {
+            [System.Security.SecurityCritical]
+            [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public bool IsEphemeral {
+            [SecuritySafeCritical]
+            [Pure]
+            get {
+                throw new NotImplementedException ();
+            }
+
+            [System.Security.SecurityCritical]
+            private set {
+                throw new NotImplementedException ();
+           }
+        }
+
+        public bool IsMachineKey {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public string KeyName {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public int KeySize {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public CngKeyUsages KeyUsage {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public IntPtr ParentWindowHandle {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+
+            [SecuritySafeCritical]
+            [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+            set {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public CngProvider Provider {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public SafeNCryptProviderHandle ProviderHandle {
+            [System.Security.SecurityCritical]
+            [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public string UniqueName {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public CngUIPolicy UIPolicy {
+            [SecuritySafeCritical]
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public static CngKey Create(CngAlgorithm algorithm) {
+            throw new NotImplementedException ();
+        }
+
+        public static CngKey Create(CngAlgorithm algorithm, string keyName) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        public static CngKey Create(CngAlgorithm algorithm, string keyName, CngKeyCreationParameters creationParameters) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        public void Delete() {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Reviewed")]
         public void Dispose() {
+            throw new NotImplementedException ();
+        }
+
+        public static bool Exists(string keyName) {
+            throw new NotImplementedException ();
+        }
+
+        public static bool Exists(string keyName, CngProvider provider) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Reviewed")]
+        public static bool Exists(string keyName, CngProvider provider, CngKeyOpenOptions options) {
+            throw new NotImplementedException ();
+        }
+
+        public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        public byte[] Export(CngKeyBlobFormat format) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+        public CngProperty GetProperty(string name, CngPropertyOptions options) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+        public bool HasProperty(string name, CngPropertyOptions options) {
+            throw new NotImplementedException ();
+        }
+
+        public static CngKey Open(string keyName) {
+            throw new NotImplementedException ();
+        }
+
+        public static CngKey Open(string keyName, CngProvider provider) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        public static CngKey Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions) {
+            throw new NotImplementedException ();
+        }
+
+        [System.Security.SecurityCritical]
+        [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+        public static CngKey Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        [SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
+        public void SetProperty(CngProperty property) {
+            throw new NotImplementedException ();
         }
 #else
         private SafeNCryptKeyHandle m_keyHandle;

+ 14 - 0
mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs

@@ -119,6 +119,20 @@ namespace System.Security.Cryptography {
             }
         }
 
+#if NETSTANDARD
+        public static CngKeyBlobFormat EccFullPrivateBlob {
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+
+        public static CngKeyBlobFormat EccFullPublicBlob {
+            get {
+                throw new NotImplementedException ();
+            }
+        }
+#endif
+
         public static CngKeyBlobFormat GenericPrivateBlob {
             get {
                 Contract.Ensures(Contract.Result<CngKeyBlobFormat>() != null);

+ 32 - 0
mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsa.cs

@@ -41,6 +41,38 @@ namespace System.Security.Cryptography {
             return CryptoConfig.CreateFromName(algorithm) as ECDsa;
         }
 
+#if NETSTANDARD
+        public static ECDsa Create (ECCurve curve)
+        {
+            throw new NotImplementedException ();
+        }
+
+        public static ECDsa Create (ECParameters parameters)
+        {
+            throw new NotImplementedException ();
+        }
+
+        public virtual ECParameters ExportExplicitParameters (bool includePrivateParameters)
+        {
+            throw new NotImplementedException ();
+        }
+
+        public virtual ECParameters ExportParameters (bool includePrivateParameters)
+        {
+            throw new NotImplementedException ();
+        }
+
+        public virtual void GenerateKey (ECCurve curve)
+        {
+            throw new NotImplementedException ();
+        }
+
+        public virtual void ImportParameters (ECParameters parameters)
+        {
+            throw new NotImplementedException ();
+        }
+#endif
+
         //
         // Signature operations
         //

+ 28 - 0
mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs

@@ -19,6 +19,34 @@ namespace System.Security.Cryptography {
     [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
     public sealed class ECDsaCng : ECDsa {
 #if MONO
+        public ECDsaCng() : this(521) {
+        }
+
+        public ECDsaCng(int keySize) {
+            throw new NotImplementedException ();
+        }
+
+        [SecuritySafeCritical]
+        public ECDsaCng(CngKey key) {
+            throw new NotImplementedException ();
+        }
+
+#if NETSTANDARD
+        public ECDsaCng(ECCurve curve) {
+            throw new NotImplementedException ();
+        }
+#endif
+
+        public CngKey Key {
+            get {
+                throw new NotImplementedException ();
+            }
+
+            private set {
+                throw new NotImplementedException ();
+            }
+        }
+
         public override byte[] SignHash(byte[] hash) {
             throw new NotImplementedException();
         }

+ 28 - 0
mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs

@@ -11,6 +11,34 @@ namespace System.Security.Cryptography
     public sealed class RSACng : RSA
     {
 #if MONO
+        public RSACng() : this(2048) { }
+
+        public RSACng(int keySize)
+        {
+            throw new NotImplementedException ();
+        }
+
+#if NETSTANDARD
+        public RSACng(CngKey key)
+        {
+            throw new NotImplementedException ();
+        }
+#endif
+
+        public CngKey Key
+        {
+            [SecuritySafeCritical]
+            get
+            {
+                throw new NotImplementedException ();
+            }
+
+            private set
+            {
+                throw new NotImplementedException ();
+            }
+        }
+
         public override RSAParameters ExportParameters(bool includePrivateParameters)
         {
             throw new NotImplementedException();

+ 11 - 0
mcs/class/referencesource/System/net/System/Net/WebHeaderCollection.cs

@@ -255,6 +255,17 @@ namespace System.Net {
         }
 #endif
 
+#if NETSTANDARD
+        public string this[string name] {
+            get {
+                throw new NotImplementedException ();
+            }
+            set {
+                throw new NotImplementedException ();
+            }
+        }
+#endif
+
 #if !FEATURE_PAL || MONO
         private bool AllowHttpRequestHeader {
             get {

+ 56 - 1
mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs

@@ -471,7 +471,62 @@ namespace System.Text.RegularExpressions {
                 }
             }
         }
-        
+
+#if NETSTANDARD
+        protected IDictionary Caps
+        {
+            get
+            {
+                var dict = new Dictionary<int, int>();
+
+                foreach (int key in caps.Keys)
+                {
+                    dict.Add (key, (int)caps[key]);
+                }
+
+                return dict;
+            }
+            set
+            {
+                if (value == null)
+                    throw new ArgumentNullException("value");
+
+ 
+                caps = new Hashtable (value.Count);
+                foreach (DictionaryEntry entry in value)
+                {
+                    caps[(int)entry.Key] = (int)entry.Value;
+                }
+            }
+        }
+
+        protected IDictionary CapNames
+        {
+            get
+            {
+                var dict = new Dictionary<string, int>();
+
+                foreach (string key in capnames.Keys)
+                {
+                    dict.Add (key, (int)capnames[key]);
+                }
+
+                return dict;
+            }
+            set
+            {
+                if (value == null)
+                    throw new ArgumentNullException("value");
+
+                capnames = new Hashtable (value.Count);
+                foreach (DictionaryEntry entry in value)
+                {
+                    capnames[(string)entry.Key] = (int)entry.Value;
+                }
+            }
+        }
+#endif
+
         /// <devdoc>
         ///    <para>
         ///       Returns the options passed into the constructor

+ 15 - 0
mcs/class/referencesource/mscorlib/system/AppContext/AppContext.cs

@@ -33,6 +33,21 @@ namespace System
             }
         }
 
+#if NETSTANDARD
+        public static string TargetFrameworkName
+        {
+            get
+            {
+                throw new NotImplementedException();
+            }
+        }
+
+        public static object GetData (string name)
+        {
+            throw new NotImplementedException();
+        }
+#endif
+
         #region Switch APIs
 #if !MONO
         static AppContext()