Merge pull request #3254 from mono/netstandard
authorMarek Safar <marek.safar@gmail.com>
Wed, 13 Jul 2016 11:30:34 +0000 (13:30 +0200)
committerGitHub <noreply@github.com>
Wed, 13 Jul 2016 11:30:34 +0000 (13:30 +0200)
[bcl] netstandard 1.6 support

263 files changed:
mcs/build/profiles/mobile.make
mcs/build/profiles/mobile_static.make
mcs/build/profiles/monodroid.make
mcs/build/profiles/monotouch_runtime.make
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.dll.sources
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/RegistryAclExtensions.cs [new file with mode: 0644]
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/TypeForwarders.cs
mcs/class/Facades/Microsoft.Win32.Registry/TypeForwarders.cs
mcs/class/Facades/System.ComponentModel.Primitives/TypeForwarders.cs
mcs/class/Facades/System.ComponentModel.TypeConverter/TypeForwarders.cs
mcs/class/Facades/System.Console/TypeForwarders.cs
mcs/class/Facades/System.Data.Common/DbColumn.cs [new file with mode: 0644]
mcs/class/Facades/System.Data.Common/DbDataReaderExtensions.Facade.cs [new file with mode: 0644]
mcs/class/Facades/System.Data.Common/IDbColumnSchemaGenerator.cs [new file with mode: 0644]
mcs/class/Facades/System.Data.Common/Makefile
mcs/class/Facades/System.Data.Common/System.Data.Common.dll.sources
mcs/class/Facades/System.Data.Common/TypeForwarders.cs
mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs
mcs/class/Facades/System.Diagnostics.Process/TypeForwarders.cs
mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.dll.sources
mcs/class/Facades/System.Diagnostics.StackTrace/TypeForwarders.cs
mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs [new file with mode: 0644]
mcs/class/Facades/System.Diagnostics.Tracing/System.Diagnostics.Tracing.dll.sources
mcs/class/Facades/System.Diagnostics.Tracing/TypeForwarders.cs
mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/mobile_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/mobile_static_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/monodroid_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/monotouch_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/monotouch_tv_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/monotouch_watch_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/xammac_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Drawing.Primitives/xammac_net_4_5_System.Drawing.Primitives.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/GlobalizationExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/SR.cs [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/StringNormalizationExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Globalization.Extensions/System.Globalization.Extensions.dll.sources
mcs/class/Facades/System.Globalization.Extensions/TypeForwarders.cs
mcs/class/Facades/System.IO.Compression/Missing.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.Compression/System.IO.Compression.dll.sources
mcs/class/Facades/System.IO.FileSystem.AccessControl/FileSystemAclExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.FileSystem.AccessControl/System.IO.FileSystem.AccessControl.dll.sources
mcs/class/Facades/System.IO.FileSystem.AccessControl/TypeForwarders.cs
mcs/class/Facades/System.IO.FileSystem.Watcher/TypeForwarders.cs
mcs/class/Facades/System.IO.Packaging/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.IO.Packaging/Makefile [new file with mode: 0644]
mcs/class/Facades/System.IO.Packaging/System.IO.Packaging.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.IO.Packaging/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/System.Net.Ping.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Net.Ping/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Security/TypeForwarders.cs
mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Net.Sockets/System.Net.Sockets.dll.sources
mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs
mcs/class/Facades/System.Reflection.TypeExtensions/Requires.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.dll.sources
mcs/class/Facades/System.Reflection.TypeExtensions/TypeExtensions.CoreCLR.cs [new file with mode: 0644]
mcs/class/Facades/System.Reflection.TypeExtensions/TypeForwarders.cs
mcs/class/Facades/System.Runtime.Serialization.Formatters/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Formatters/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Formatters/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Primitives/ISerializationSurrogateProvider.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources
mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs
mcs/class/Facades/System.Runtime.Serialization.Xml/DataContractSerializerExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile
mcs/class/Facades/System.Runtime.Serialization.Xml/NotImplemented.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources
mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Algorithms/System.Security.Cryptography.Algorithms.dll.sources
mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/System.Security.Cryptography.Cng.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/System.Security.Cryptography.Csp.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Csp/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Security.Cryptography.Pkcs/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.Principal.Windows/TypeForwarders.cs
mcs/class/Facades/System.Security.SecureString/SecureStringMarshal.cs [new file with mode: 0644]
mcs/class/Facades/System.Security.SecureString/System.Security.SecureString.dll.sources
mcs/class/Facades/System.Security.SecureString/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Duplex/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.NetTcp/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Primitives/Makefile
mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources
mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs
mcs/class/Facades/System.ServiceProcess.ServiceController/Makefile
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceControllerStatus_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceController_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceStartMode_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceType_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/System.ServiceProcess.ServiceController.dll.sources
mcs/class/Facades/System.ServiceProcess.ServiceController/TimeoutException_mobile.cs [new file with mode: 0644]
mcs/class/Facades/System.ServiceProcess.ServiceController/TypeForwarders.cs
mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.CodePages/CodePagesEncodingProvider.cs [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.CodePages/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Threading.AccessControl/System.Threading.AccessControl.dll.sources
mcs/class/Facades/System.Threading.AccessControl/ThreadingAclExtensions.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.AccessControl/TypeForwarders.cs
mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandle.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandleOverlapped.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolPreAllocatedOverlapped.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/DeferredDisposableLifetime.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/HResults.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/Makefile
mcs/class/Facades/System.Threading.Overlapped/SR.cs [new file with mode: 0644]
mcs/class/Facades/System.Threading.Overlapped/System.Threading.Overlapped.dll.sources
mcs/class/Facades/System.Threading.Overlapped/TypeForwarders.cs
mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs
mcs/class/Facades/System.Xml.XPath.XDocument/Makefile
mcs/class/Facades/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.dll.sources
mcs/class/Facades/System.Xml.XPath.XDocument/TypeForwarders.cs
mcs/class/Facades/System.Xml.XPath.XDocument/XDocumentExtensions.cs [new file with mode: 0644]
mcs/class/Facades/subdirs.make
mcs/class/Makefile
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs [new file with mode: 0644]
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs [new file with mode: 0644]
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs [new file with mode: 0644]
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs [new file with mode: 0644]
mcs/class/System.Core/System.IO.Pipes/AnonymousPipeClientStream.cs
mcs/class/System.Core/System.IO.Pipes/AnonymousPipeServerStream.cs
mcs/class/System.Core/System.IO.Pipes/NamedPipeClientStream.cs
mcs/class/System.Core/System.IO.Pipes/NamedPipeServerStream.cs
mcs/class/System.Core/System.IO.Pipes/PipeStream.cs
mcs/class/System.Core/System.Security.Cryptography/AesCng.cs [new file with mode: 0644]
mcs/class/System.Core/System.Security.Cryptography/TripleDESCng.cs [new file with mode: 0644]
mcs/class/System.Core/common_System.Core.dll.sources
mcs/class/System.Core/mobile_static_System.Core.dll.sources
mcs/class/System.Core/net_4_x_System.Core.dll.sources
mcs/class/System.Data/Microsoft.SqlServer.Server/SqlDataRecord.cs
mcs/class/System.Drawing/Makefile
mcs/class/System.Drawing/System.Drawing/Point.cs
mcs/class/System.Drawing/System.Drawing/Rectangle.cs
mcs/class/System.Drawing/System.Drawing/Size.cs
mcs/class/System.Drawing/System.Drawing/SizeF.cs
mcs/class/System.Net.Http.WinHttpHandler/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/Makefile [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.dll.sources [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/CookieUsePolicy.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WinHttpHandler.cs [new file with mode: 0644]
mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WindowsProxyUsePolicy.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/Makefile
mcs/class/System.Numerics.Vectors/SR.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics.Vectors.dll.sources
mcs/class/System.Numerics.Vectors/System.Numerics/ConstantHelper.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/HashCodeHelper.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/JitIntrinsicAttribute.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/Vector.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/System.Numerics/Vector_Operations.cs [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.exclude.sources [new file with mode: 0644]
mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.sources [new file with mode: 0644]
mcs/class/System.Reflection.Context/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Reflection.Context/Makefile [new file with mode: 0644]
mcs/class/System.Reflection.Context/System.Reflection.Context.dll.sources [new file with mode: 0644]
mcs/class/System.Reflection.Context/System.Reflection.Context/CustomReflectionContext.cs [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/Makefile [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources [new file with mode: 0644]
mcs/class/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs [new file with mode: 0644]
mcs/class/System.Security/System.Security.Cryptography/ProtectedData.cs
mcs/class/System.Security/common_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/mobile_static_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monodroid_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_runtime_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_tv_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_tv_runtime_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_watch_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/monotouch_watch_runtime_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.Security/xammac_System.Security.dll.sources [new file with mode: 0644]
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ConnectionOrientedTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/WindowsStreamSecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/UserNameSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.dll.sources
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsSecurity.cs
mcs/class/System.ServiceModel/System.ServiceModel/CallbackBehaviorAttribute.cs
mcs/class/System.ServiceModel/System.ServiceModel/DnsEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/HttpBindingBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityOverTcp.cs
mcs/class/System.ServiceModel/System.ServiceModel/MessageSecurityVersion.cs
mcs/class/System.ServiceModel/System.ServiceModel/NetHttpsBinding.cs [new file with mode: 0644]
mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/UpnEndpointIdentity.cs
mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources
mcs/class/System.Xml.XPath.XmlDocument/Assembly/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/System.Xml.XPath.XmlDocument/Makefile [new file with mode: 0644]
mcs/class/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.dll.sources [new file with mode: 0644]
mcs/class/System.Xml.XPath.XmlDocument/System.Xml/XmlDocumentXPathExtensions.cs [new file with mode: 0644]
mcs/class/System/System.IO/FileSystemWatcher_mobile.cs [new file with mode: 0644]
mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs
mcs/class/System/mobile_System.dll.sources
mcs/class/corlib/Microsoft.Win32/Registry.cs
mcs/class/corlib/Microsoft.Win32/RegistryHive.cs
mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
mcs/class/corlib/Microsoft.Win32/RegistryValueOptions.cs
mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs
mcs/class/corlib/System.Globalization/CultureInfo.cs
mcs/class/corlib/System.Reflection.Emit/FlowControl.cs
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
mcs/class/corlib/System.Reflection.Emit/OpCodeNames.cs
mcs/class/corlib/System.Reflection.Emit/OpCodeType.cs
mcs/class/corlib/System.Reflection.Emit/OpCodes.cs
mcs/class/corlib/System.Reflection.Emit/OperandType.cs
mcs/class/corlib/System.Reflection.Emit/PackingSize.cs
mcs/class/corlib/System.Reflection.Emit/StackBehaviour.cs
mcs/class/corlib/System.Reflection.Metadata/AssemblyExtensions.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection/AssemblyName.cs
mcs/class/corlib/System.Runtime.Loader/AssemblyLoadContext.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources
mcs/class/referencesource/System.Core/System/Security/Cryptography/BCryptNative.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/CngKey.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
mcs/tools/mono-api-html/ApiDiff.cs
mcs/tools/mono-api-html/ClassComparer.cs
mcs/tools/mono-api-html/FieldComparer.cs
mcs/tools/mono-api-html/MemberComparer.cs

index 4cb0fabc2db9614a0dd9a9c7b6deb6ac549a5b96..e531f44a4b55b581ff562313c61af33b8d721a8e 100644 (file)
@@ -23,6 +23,7 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_0 \
        -d:NET_4_5 \
        -d:MONO \
+       -d:NETSTANDARD \
        -nowarn:1699 \
        -nostdlib \
        $(DEFAULT_REFERENCES) \
index 4dd77182c7be9c82f3f0ebfcbd62f7e466bf2224..5663124343ac69dca38e1601b358c6ae24f01eec 100644 (file)
@@ -21,6 +21,7 @@ PROFILE_MCS_FLAGS = \
        -d:NET_4_0 \
        -d:NET_4_5 \
        -d:MONO \
+       -d:NETSTANDARD \
        -d:MOBILE,MOBILE_STATIC,MOBILE_LEGACY \
        -d:FULL_AOT_RUNTIME \
        -d:DISABLE_REMOTING \
index 9aacd7f48b5141e5abef038d39cd078fa4c12d34..65919907c270b35fefe7bcbc6ba24b2212895b57 100644 (file)
@@ -25,6 +25,7 @@ PROFILE_MCS_FLAGS = \
        -d:MOBILE_DYNAMIC \
        -d:MONODROID \
        -d:ANDROID \
+       -d:NETSTANDARD \
        -nowarn:1699 \
        -nostdlib \
        $(DEFAULT_REFERENCES) \
index 2ff609c1a7def7d57a49474029c829da0a656ecb..e4370cf4f985b188dc80ed333347e114bf4e24c1 100644 (file)
@@ -27,6 +27,7 @@ PROFILE_MCS_FLAGS = \
        -d:DISABLE_REMOTING \
        -d:DISABLE_COM \
        -d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
+       -d:NETSTANDARD \
        -nowarn:1699 \
        -nostdlib \
        $(DEFAULT_REFERENCES) \
diff --git a/mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/RegistryAclExtensions.cs b/mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/RegistryAclExtensions.cs
new file mode 100644 (file)
index 0000000..deb3458
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// RegistryAclExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Security;
+using System.Security.AccessControl;
+
+namespace Microsoft.Win32
+{
+       public static class RegistryAclExtensions
+       {
+               [MonoTODO]
+               public static RegistrySecurity GetAccessControl (this RegistryKey key)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static RegistrySecurity GetAccessControl (this RegistryKey key, AccessControlSections includeSections)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl (this RegistryKey key, RegistrySecurity registrySecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index cb252be1af3c7655dbf23e9ad81c0660baf77ff2..bdef1972306e60feafe11e0927e3b39b94fa7cf9 100644 (file)
@@ -23,4 +23,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistryAccessRule))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistryAuditRule))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistrySecurity))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryAclExtensions))]
index ecf772dd7eccdac8fc14834b9cc94a4dae156928..fae8514159ef6ae454d4414207ded833a41eef4d 100644 (file)
 // THE SOFTWARE.
 // 
 
-#if !MOBILE
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.Registry))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryHive))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryKey))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryValueKind))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryValueOptions))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryView))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeRegistryHandle))]
index 81a899b5e01ca018b4525724464a24bba13a5ff4..710df4ecd209261fe9ced57019332aab1825ce95 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BrowsableAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CategoryAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ComponentCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DescriptionAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignOnlyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerCategoryAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerSerializationVisibility))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerSerializationVisibilityAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DisplayNameAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventHandlerList))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IComponent))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IContainer))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ISite))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ImmutableObjectAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.InitializationEventAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.LocalizableAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MergablePropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.NotifyParentPropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ParenthesizePropertyNameAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ReadOnlyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshProperties))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshPropertiesAttribute))]
 
 
index 4a50ae332d04472bd74bd15b816d8973474c69bf..12d2434bfcf66a4fc3c5bef3bbc4fe617092af72 100644 (file)
 // 
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ArrayConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AttributeCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AttributeProviderAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BaseNumberConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BooleanConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ByteConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CancelEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CharConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeAction))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CustomTypeDescriptor))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DateTimeConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DateTimeOffsetConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DecimalConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultEventAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultPropertyAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DoubleConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EnumConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventDescriptor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventDescriptorCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ExtenderProvidedPropertyAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.GuidConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.HandledEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.HandledEventHandler))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ICustomTypeDescriptor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IExtenderProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IListSource))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypeDescriptorContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypedList))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int16Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int32Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int64Converter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypeDescriptorContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.InvalidAsynchronousStateException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MemberDescriptor))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MultilineStringConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.NullableConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyDescriptor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyDescriptorCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ProvidePropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.SByteConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.SingleConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.StringConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TimeSpanConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeConverterAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptionProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptionProviderAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptor))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeListConverter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt16Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt32Converter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt64Converter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriTypeConverter))]
 
 
index fae3bad3783e1c263a037089ed795ee15ee07b7f..c1695f51f4b0d40654781a4f3b5afeeb556755ac 100644 (file)
@@ -24,7 +24,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleCancelEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleCancelEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleColor))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleSpecialKey))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleKey))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleKeyInfo))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleModifiers))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleSpecialKey))]
diff --git a/mcs/class/Facades/System.Data.Common/DbColumn.cs b/mcs/class/Facades/System.Data.Common/DbColumn.cs
new file mode 100644 (file)
index 0000000..f7bc5c7
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// DbColumn.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Collections.Generic;
+
+namespace System.Data.Common
+{
+    public abstract class DbColumn
+    {
+        public bool? AllowDBNull { get; protected set; }
+        public string BaseCatalogName { get; protected set; }
+        public string BaseColumnName { get; protected set; }
+        public string BaseSchemaName { get; protected set; }
+        public string BaseServerName { get; protected set; }
+        public string BaseTableName { get; protected set; }
+        public string ColumnName { get; protected set; }
+        public int? ColumnOrdinal { get; protected set; }
+        public int? ColumnSize { get; protected set; }
+        public bool? IsAliased { get; protected set; }
+        public bool? IsAutoIncrement { get; protected set; }
+        public bool? IsExpression { get; protected set; }
+        public bool? IsHidden { get; protected set; }
+        public bool? IsIdentity { get; protected set; }
+        public bool? IsKey { get; protected set; }
+        public bool? IsLong { get; protected set; }
+        public bool? IsReadOnly { get; protected set; }
+        public bool? IsUnique { get; protected set; }
+        public int? NumericPrecision { get; protected set; }
+        public int? NumericScale { get; protected set; }
+        public string UdtAssemblyQualifiedName { get; protected set; }
+        public Type DataType { get; protected set; }
+        public string DataTypeName { get; protected set; }
+        public virtual object this[string property] {
+               get {
+                       throw new NotImplementedException ();
+               }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Data.Common/DbDataReaderExtensions.Facade.cs b/mcs/class/Facades/System.Data.Common/DbDataReaderExtensions.Facade.cs
new file mode 100644 (file)
index 0000000..ba1913f
--- /dev/null
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.Generic;
+
+namespace System.Data.Common
+{
+
+    internal class DataRowDbColumn : DbColumn
+    {
+        private DataColumnCollection schemaColumns;
+        private DataRow schemaRow;
+
+        public DataRowDbColumn(DataRow readerSchemaRow, DataColumnCollection readerSchemaColumns)
+        {
+            this.schemaRow = readerSchemaRow;
+            this.schemaColumns = readerSchemaColumns;
+            populateFields();
+        }
+
+        private void populateFields()
+        {
+            AllowDBNull = GetDbColumnValue<bool?>(SchemaTableColumn.AllowDBNull);
+            BaseCatalogName = GetDbColumnValue<string>(SchemaTableOptionalColumn.BaseCatalogName);
+            BaseColumnName = GetDbColumnValue<string>(SchemaTableColumn.BaseColumnName);
+            BaseSchemaName = GetDbColumnValue<string>(SchemaTableColumn.BaseSchemaName);
+            BaseServerName = GetDbColumnValue<string>(SchemaTableOptionalColumn.BaseServerName);
+            BaseTableName = GetDbColumnValue<string>(SchemaTableColumn.BaseTableName);
+            ColumnName = GetDbColumnValue<string>(SchemaTableColumn.ColumnName);
+            ColumnOrdinal = GetDbColumnValue<int?>(SchemaTableColumn.ColumnOrdinal);
+            ColumnSize = GetDbColumnValue<int?>(SchemaTableColumn.ColumnSize);
+            IsAliased = GetDbColumnValue<bool?>(SchemaTableColumn.IsAliased);
+            IsAutoIncrement = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsAutoIncrement);
+            IsExpression = GetDbColumnValue<bool>(SchemaTableColumn.IsExpression);
+            IsHidden = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsHidden);
+            IsIdentity = GetDbColumnValue<bool?>("IsIdentity");
+            IsKey = GetDbColumnValue<bool?>(SchemaTableColumn.IsKey);
+            IsLong = GetDbColumnValue<bool?>(SchemaTableColumn.IsLong);
+            IsReadOnly = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsReadOnly);
+            IsUnique = GetDbColumnValue<bool?>(SchemaTableColumn.IsUnique);
+            NumericPrecision = GetDbColumnValue<int?>(SchemaTableColumn.NumericPrecision);
+            NumericScale = GetDbColumnValue<int?>(SchemaTableColumn.NumericScale);
+            UdtAssemblyQualifiedName = GetDbColumnValue<string>("UdtAssemblyQualifiedName");
+            DataType = GetDbColumnValue<Type>(SchemaTableColumn.DataType);
+            DataTypeName = GetDbColumnValue<string>("DataTypeName");
+        }
+
+        private T GetDbColumnValue<T>(string columnName)
+        {
+            if (!schemaColumns.Contains(columnName))
+            {
+                return default(T);
+            }
+            object schemaObject = schemaRow[columnName];
+            if (schemaObject is T)
+            {
+                return (T)schemaObject;
+            }
+            return default(T);
+        }
+    }
+
+    public static class DbDataReaderExtensions
+    {
+        public static System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> GetColumnSchema(this DbDataReader reader)
+        {
+            IList<DbColumn> columnSchema = new List<DbColumn>();
+            DataTable schemaTable = reader.GetSchemaTable();
+            DataColumnCollection schemaTableColumns = schemaTable.Columns;
+            foreach (DataRow row in schemaTable.Rows)
+            {
+                DbColumn dbColumn = new DataRowDbColumn(row, schemaTableColumns);
+                columnSchema.Add(dbColumn);
+            }
+            System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> readOnlyColumnSchema = new System.Collections.ObjectModel.ReadOnlyCollection<DbColumn>(columnSchema);
+            return readOnlyColumnSchema;
+        }
+
+        public static bool CanGetColumnSchema(this DbDataReader reader)
+        {
+            return true;
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Data.Common/IDbColumnSchemaGenerator.cs b/mcs/class/Facades/System.Data.Common/IDbColumnSchemaGenerator.cs
new file mode 100644 (file)
index 0000000..ed6c519
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// IDbColumnSchemaGenerator.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Data.Common
+{
+       public interface IDbColumnSchemaGenerator
+       {
+               System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> GetColumnSchema();
+       }
+}
\ No newline at end of file
index 30bf3dd018146c2ca81002fde79578ff7f6457c1..ff6d03567897533cc1b43a22bd216a4bcecea509 100644 (file)
@@ -11,7 +11,7 @@ LIBRARY = System.Data.Common.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.Data
+LIB_REFS = System System.Data System.Xml
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 PLATFORM_DEBUG_FLAGS =
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..6b723549733e3bf504ea75990958fa103ae257ff 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-
+IDbColumnSchemaGenerator.cs
+DbColumn.cs
+DbDataReaderExtensions.Facade.cs
index 52b199a2e67ea1fb11200196d40d83ce233e8991..9470c9c78b2ca156ac4782396c30c7b48217b5ca 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandBehavior))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnectionStringBuilder))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataRecord))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbEnumerator))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameterCollection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbProviderFactory))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbTransaction))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConnectionState))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTable))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DbType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameterCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataReader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataRecord))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbCommand))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbConnection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbDataParameter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbTransaction))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IsolationLevel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ParameterDirection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.UpdateRowSource))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
 
 
index d930326b45e1143c3ebff6902896c038eeab8e51..3237d9eb98fbddfa777678623072a5db0808da07 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.SqlServer.Server.SqlMetaData))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.ApplicationIntent))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SortOrder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopy))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMapping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientFactory))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnection))]
@@ -36,6 +40,8 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlInfoMessageEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlParameter))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlParameterCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlRowsCopiedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlRowsCopiedEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlTransaction))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlDbType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.INullable))]
index 7601feb313ee998d285dd999d92e68cf4824a625..e91a664406dd54a619020d96cd69e0b18525c3d0 100644 (file)
@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 // 
 
-// TODO: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DataReceivedEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DataReceivedEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Process))]
diff --git a/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs b/mcs/class/Facades/System.Diagnostics.StackTrace/StackFrameExtensions.cs
new file mode 100644 (file)
index 0000000..1fb375f
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// StackFrameExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+
+namespace System.Diagnostics
+{
+       public static class StackFrameExtensions
+       {
+               [MonoTODO]
+               public static bool HasNativeImage (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool HasMethod (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool HasILOffset (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool HasSource (this StackFrame stackFrame)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..9d113cec2030b8af0bc1ae8f0fd91b7781671d1a 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+StackFrameExtensions.cs
index b07464db3e2a0f7329dcbbf322ea2fd481cea100..3643429a219efa4bb5011e6c17bbd9b5b76d4a58 100644 (file)
@@ -22,5 +22,4 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrame))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackTrace))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrameExtensions))]
 
diff --git a/mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs b/mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs
new file mode 100644 (file)
index 0000000..7fedc40
--- /dev/null
@@ -0,0 +1,41 @@
+//
+// EventCounter.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Diagnostics.Tracing
+{
+       public class EventCounter
+       {
+               public EventCounter (string name, EventSource eventSource)
+               {
+               }
+
+               public void WriteMetric (float value)
+               {
+               }
+       }
+}
\ No newline at end of file
index 80cc7e2006ae50ecc8c57e48215e8dc21b7f5c5c..5c8ab29d77aeb95e7a9fcceeec94fccc04ccecdb 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventActivityOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventChannel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommandEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventDataAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldFormat))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldTags))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventIgnoreAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventKeywords))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventLevel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventListener))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventManifestOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventOpcode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSource))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceSettings))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceSettings))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTags))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventActivityOptions))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventDataAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldFormat))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldTags))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventIgnoreAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventManifestOptions))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceOptions))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTags))]
diff --git a/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..fd9a20b
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Drawing.Primitives.dll")]
+[assembly: AssemblyDescription ("System.Drawing.Primitives.dll")]
+[assembly: AssemblyDefaultAlias ("System.Drawing.Primitives.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.Drawing.Primitives/Makefile b/mcs/class/Facades/System.Drawing.Primitives/Makefile
new file mode 100644 (file)
index 0000000..e788928
--- /dev/null
@@ -0,0 +1,27 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Drawing.Primitives
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Drawing.Primitives.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+ifneq (2.1, $(FRAMEWORK_VERSION))
+ifndef XAMMAC_4_5
+LIB_REFS += System.Drawing
+endif
+endif
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
diff --git a/mcs/class/Facades/System.Drawing.Primitives/System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..719628d
--- /dev/null
@@ -0,0 +1,2 @@
+TypeForwarders.cs
+AssemblyInfo.cs
diff --git a/mcs/class/Facades/System.Drawing.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.Drawing.Primitives/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..af29167
--- /dev/null
@@ -0,0 +1,28 @@
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Point))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.PointF))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Rectangle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.RectangleF))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Size))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SizeF))]
diff --git a/mcs/class/Facades/System.Drawing.Primitives/mobile_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/mobile_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..dd5e421
--- /dev/null
@@ -0,0 +1,8 @@
+AssemblyInfo.cs
+
+../../System.Drawing/System.Drawing/Point.cs
+../../System.Drawing/System.Drawing/PointF.cs
+../../System.Drawing/System.Drawing/Rectangle.cs
+../../System.Drawing/System.Drawing/RectangleF.cs
+../../System.Drawing/System.Drawing/Size.cs
+../../System.Drawing/System.Drawing/SizeF.cs
diff --git a/mcs/class/Facades/System.Drawing.Primitives/mobile_static_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/mobile_static_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/monodroid_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/monodroid_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/monotouch_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/monotouch_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/monotouch_tv_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/monotouch_tv_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/monotouch_watch_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/monotouch_watch_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/xammac_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/xammac_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Drawing.Primitives/xammac_net_4_5_System.Drawing.Primitives.dll.sources b/mcs/class/Facades/System.Drawing.Primitives/xammac_net_4_5_System.Drawing.Primitives.dll.sources
new file mode 100644 (file)
index 0000000..006657a
--- /dev/null
@@ -0,0 +1 @@
+#include mobile_System.Drawing.Primitives.dll.sources
diff --git a/mcs/class/Facades/System.Globalization.Extensions/GlobalizationExtensions.cs b/mcs/class/Facades/System.Globalization.Extensions/GlobalizationExtensions.cs
new file mode 100644 (file)
index 0000000..43c1494
--- /dev/null
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
+
+namespace System.Globalization
+{
+    public static class GlobalizationExtensions
+    {
+        public static StringComparer GetStringComparer(this CompareInfo compareInfo, CompareOptions options)
+        {
+            if (compareInfo == null)
+            {
+                throw new ArgumentNullException(nameof(compareInfo));
+            }
+
+            if (options == CompareOptions.Ordinal)
+            {
+                return StringComparer.Ordinal;
+            }
+
+            if (options == CompareOptions.OrdinalIgnoreCase)
+            {
+                return StringComparer.OrdinalIgnoreCase;
+            }
+
+            if ((options & CultureAwareComparer.ValidCompareMaskOffFlags) != 0)
+            {
+                throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
+            }
+
+            return new CultureAwareComparer(compareInfo, options);
+        }
+    }
+
+    internal sealed class CultureAwareComparer : StringComparer
+    {
+        internal const CompareOptions ValidCompareMaskOffFlags =
+            ~(CompareOptions.IgnoreCase | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreNonSpace |
+              CompareOptions.IgnoreWidth | CompareOptions.IgnoreKanaType | CompareOptions.StringSort);
+
+        private readonly CompareInfo _compareInfo;
+        private readonly CompareOptions _options;
+
+        internal CultureAwareComparer(CompareInfo compareInfo, CompareOptions options)
+        {
+            Debug.Assert((options & ValidCompareMaskOffFlags) == 0);
+            _compareInfo = compareInfo;
+            _options = options;
+        }
+
+        public override int Compare(string x, string y)
+        {
+            if (Object.ReferenceEquals(x, y)) return 0;
+            if (x == null) return -1;
+            if (y == null) return 1;
+            return _compareInfo.Compare(x, y, _options);
+        }
+
+        public override bool Equals(string x, string y)
+        {
+            if (Object.ReferenceEquals(x, y)) return true;
+            if (x == null || y == null) return false;
+
+            return (_compareInfo.Compare(x, y, _options) == 0);
+        }
+
+        public override int GetHashCode(string obj)
+        {
+            if (obj == null)
+            {
+                throw new ArgumentNullException(nameof(obj));
+            }
+            Contract.EndContractBlock();
+
+            // StringSort used in compare operation and not with the hashing
+            return _compareInfo.GetHashCode(obj, _options & (~CompareOptions.StringSort));
+        }
+
+        // Equals method for the comparer itself. 
+        public override bool Equals(object obj)
+        {
+            CultureAwareComparer comparer = obj as CultureAwareComparer;
+            return
+                comparer != null &&
+                _options == comparer._options &&
+                _compareInfo.Equals(comparer._compareInfo);
+        }
+
+        public override int GetHashCode()
+        {
+            return _compareInfo.GetHashCode() ^ ((int)_options & 0x7FFFFFFF);
+        }
+    }
+}
diff --git a/mcs/class/Facades/System.Globalization.Extensions/SR.cs b/mcs/class/Facades/System.Globalization.Extensions/SR.cs
new file mode 100644 (file)
index 0000000..52a75a8
--- /dev/null
@@ -0,0 +1,4 @@
+partial class SR
+{
+       public const string Argument_InvalidFlag = "Value of flags is invalid.";
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Globalization.Extensions/StringNormalizationExtensions.cs b/mcs/class/Facades/System.Globalization.Extensions/StringNormalizationExtensions.cs
new file mode 100644 (file)
index 0000000..7953b29
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// StringNormalizationExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+using System.Text;
+
+namespace System
+{
+       public static class StringNormalizationExtensions
+       {
+               [MonoTODO]
+               public static bool IsNormalized(this string value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static bool IsNormalized(this string value, NormalizationForm normalizationForm)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static String Normalize(this string value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static String Normalize(this string value, NormalizationForm normalizationForm)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..8cec8fa1ac31da87e4be0dda612242a37528b28a 100644 (file)
@@ -1,3 +1,7 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+SR.cs
+GlobalizationExtensions.cs
+StringNormalizationExtensions.cs
index 2f88c337195517b9598dea2519535fbef11ac4a6..ae5a0bbb413cd0b0b19b3ad0b0dc94b14ca9a8c0 100644 (file)
@@ -22,5 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.IdnMapping))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.NormalizationForm))]
-// Missing: [assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.GlobalizationExtensions))]
-// Missing: [assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringNormalizationExtensions))]
diff --git a/mcs/class/Facades/System.IO.Compression/Missing.cs b/mcs/class/Facades/System.IO.Compression/Missing.cs
new file mode 100644 (file)
index 0000000..cd06b1c
--- /dev/null
@@ -0,0 +1,40 @@
+// This is stub only. The implementation should come from https://github.com/dotnet/corefx/tree/master/src/System.IO.Compression/src/System/IO/Compression
+
+namespace System.IO.Compression
+{
+       public class ZipArchive : System.IDisposable
+       {
+               public ZipArchive(System.IO.Stream stream) { }
+               public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode) { }
+               public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen) { }
+               public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen, System.Text.Encoding entryNameEncoding) { }
+               public System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry> Entries { get { return default(System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry>); } }
+               public System.IO.Compression.ZipArchiveMode Mode { get { return default(System.IO.Compression.ZipArchiveMode); } }
+               public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName) { return default(System.IO.Compression.ZipArchiveEntry); }
+               public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName, System.IO.Compression.CompressionLevel compressionLevel) { return default(System.IO.Compression.ZipArchiveEntry); }
+               public void Dispose() { }
+               protected virtual void Dispose(bool disposing) { }
+               public System.IO.Compression.ZipArchiveEntry GetEntry(string entryName) { return default(System.IO.Compression.ZipArchiveEntry); }
+       }
+
+       public partial class ZipArchiveEntry
+       {
+               internal ZipArchiveEntry() { }
+               public System.IO.Compression.ZipArchive Archive { get { return default(System.IO.Compression.ZipArchive); } }
+               public long CompressedLength { get { return default(long); } }
+               public string FullName { get { return default(string); } }
+               public System.DateTimeOffset LastWriteTime { get { return default(System.DateTimeOffset); } set { } }
+               public long Length { get { return default(long); } }
+               public string Name { get { return default(string); } }
+               public void Delete() { }
+               public System.IO.Stream Open() { return default(System.IO.Stream); }
+               public override string ToString() { return default(string); }
+       }
+
+       public enum ZipArchiveMode
+       {
+               Create = 1,
+               Read = 0,
+               Update = 2,
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.IO.FileSystem.AccessControl/FileSystemAclExtensions.cs b/mcs/class/Facades/System.IO.FileSystem.AccessControl/FileSystemAclExtensions.cs
new file mode 100644 (file)
index 0000000..1dd8d97
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// FileSystemAclExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+namespace System.IO
+{
+       public static partial class FileSystemAclExtensions
+       {
+               [MonoTODO]
+               public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index 12daecd0383c701a5f1d3170b2ddde387f990d64..18351db171e67ece3658a19c82b0bb3bcbbc6a92 100644 (file)
@@ -27,5 +27,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemAuditRule))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemRights))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemSecurity))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.FileSystemAclExtensions))]
index 6237d34bfc4d7c1abd7213d00a60c0c8e50bf37e..b25bcf38598ffc09c45cf98b294e915469ba9f50 100644 (file)
@@ -29,5 +29,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.RenamedEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.RenamedEventHandler))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.WatcherChangeTypes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.WaitForChangedResult))]
 
 
diff --git a/mcs/class/Facades/System.IO.Packaging/AssemblyInfo.cs b/mcs/class/Facades/System.IO.Packaging/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..7b0813f
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.IO.Packaging.dll")]
+[assembly: AssemblyDescription ("System.IO.Packaging.dll")]
+[assembly: AssemblyDefaultAlias ("System.IO.Packaging.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.IO.Packaging/Makefile b/mcs/class/Facades/System.IO.Packaging/Makefile
new file mode 100644 (file)
index 0000000..cbf6d68
--- /dev/null
@@ -0,0 +1,21 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.IO.Packaging
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.IO.Packaging.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System WindowsBase
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
diff --git a/mcs/class/Facades/System.IO.Packaging/System.IO.Packaging.dll.sources b/mcs/class/Facades/System.IO.Packaging/System.IO.Packaging.dll.sources
new file mode 100644 (file)
index 0000000..719628d
--- /dev/null
@@ -0,0 +1,2 @@
+TypeForwarders.cs
+AssemblyInfo.cs
diff --git a/mcs/class/Facades/System.IO.Packaging/TypeForwarders.cs b/mcs/class/Facades/System.IO.Packaging/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..a3c4504
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.FileFormatException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.CompressionOption))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.EncryptionOption))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackUriHelper))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.Package))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackagePart))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackagePartCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageProperties))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationship))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationshipCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationshipSelector))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.PackageRelationshipSelectorType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.TargetMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.ZipPackage))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Packaging.ZipPackagePart))]
diff --git a/mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..507e590
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Net.Ping.dll")]
+[assembly: AssemblyDescription ("System.Net.Ping.dll")]
+[assembly: AssemblyDefaultAlias ("System.Net.Ping.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
diff --git a/mcs/class/Facades/System.Net.Ping/Makefile b/mcs/class/Facades/System.Net.Ping/Makefile
new file mode 100644 (file)
index 0000000..750ace6
--- /dev/null
@@ -0,0 +1,21 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Net.Ping
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Net.Ping.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
diff --git a/mcs/class/Facades/System.Net.Ping/System.Net.Ping.dll.sources b/mcs/class/Facades/System.Net.Ping/System.Net.Ping.dll.sources
new file mode 100644 (file)
index 0000000..719628d
--- /dev/null
@@ -0,0 +1,2 @@
+TypeForwarders.cs
+AssemblyInfo.cs
diff --git a/mcs/class/Facades/System.Net.Ping/TypeForwarders.cs b/mcs/class/Facades/System.Net.Ping/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..2f79a42
--- /dev/null
@@ -0,0 +1,27 @@
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.IPStatus))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.Ping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingReply))]
index 884e50a3fd27513cb944012361964ed52ffd9fac..3167d764e13327feab061a0855dc8a27632cca80 100644 (file)
 // THE SOFTWARE.
 // 
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.AuthenticatedStream))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.EncryptionPolicy))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.LocalCertificateSelectionCallback))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.NegotiateStream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.ProtectionLevel))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.RemoteCertificateValidationCallback))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.SslStream))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.AuthenticationException))]
@@ -29,5 +32,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.PolicyEnforcement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.ProtectionScenario))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.ServiceNameCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.InvalidCredentialException))]
 
 
diff --git a/mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs b/mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs
new file mode 100644 (file)
index 0000000..2add0e6
--- /dev/null
@@ -0,0 +1,36 @@
+//
+// SocketReceiveFromResult.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Net.Sockets
+{
+       public struct SocketReceiveFromResult
+       {
+               public int ReceivedBytes;
+               public EndPoint RemoteEndPoint;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs b/mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs
new file mode 100644 (file)
index 0000000..ab5ed10
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// SocketReceiveMessageFromResult.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Net.Sockets
+{
+       public struct SocketReceiveMessageFromResult
+       {
+               public int ReceivedBytes;
+               public SocketFlags SocketFlags;
+               public EndPoint RemoteEndPoint;
+               public IPPacketInformation PacketInformation;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs b/mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs
new file mode 100644 (file)
index 0000000..a3e24ed
--- /dev/null
@@ -0,0 +1,250 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace System.Net.Sockets
+{
+    public static class SocketTaskExtensions
+    {
+        public static Task<Socket> AcceptAsync(this Socket socket)
+        {
+            return Task<Socket>.Factory.FromAsync(
+                (callback, state) => ((Socket)state).BeginAccept(callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
+                state: socket);
+        }
+
+        public static Task<Socket> AcceptAsync(this Socket socket, Socket acceptSocket)
+        {
+            const int ReceiveSize = 0;
+            return Task<Socket>.Factory.FromAsync(
+                (socketForAccept, receiveSize, callback, state) => ((Socket)state).BeginAccept(socketForAccept, receiveSize, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
+                acceptSocket,
+                ReceiveSize,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint)
+        {
+            return Task.Factory.FromAsync(
+                (targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                remoteEndPoint,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, IPAddress address, int port)
+        {
+            return Task.Factory.FromAsync(
+                (targetAddress, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddress, targetPort, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                address,
+                port,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, IPAddress[] addresses, int port)
+        {
+            return Task.Factory.FromAsync(
+                (targetAddresses, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddresses, targetPort, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                addresses,
+                port,
+                state: socket);
+        }
+
+        public static Task ConnectAsync(this Socket socket, string host, int port)
+        {
+            return Task.Factory.FromAsync(
+                (targetHost, targetPort, callback, state) => ((Socket)state).BeginConnect(targetHost, targetPort, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
+                host,
+                port,
+                state: socket);
+        }
+
+        public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffer, flags, callback, state) => ((Socket)state).BeginReceive(
+                                                              targetBuffer.Array,
+                                                              targetBuffer.Offset,
+                                                              targetBuffer.Count,
+                                                              flags,
+                                                              callback,
+                                                              state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
+                buffer,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<int> ReceiveAsync(
+            this Socket socket,
+            IList<ArraySegment<byte>> buffers,
+            SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffers, flags, callback, state) => ((Socket)state).BeginReceive(targetBuffers, flags, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
+                buffers,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<SocketReceiveFromResult> ReceiveFromAsync(
+            this Socket socket,
+            ArraySegment<byte> buffer,
+            SocketFlags socketFlags,
+            EndPoint remoteEndPoint)
+        {
+            object[] packedArguments = new object[] { socket, remoteEndPoint };
+
+            return Task<SocketReceiveFromResult>.Factory.FromAsync(
+                (targetBuffer, flags, callback, state) =>
+                {
+                    var arguments = (object[])state;
+                    var s = (Socket)arguments[0];
+                    var e = (EndPoint)arguments[1];
+
+                    IAsyncResult result = s.BeginReceiveFrom(
+                        targetBuffer.Array,
+                        targetBuffer.Offset,
+                        targetBuffer.Count,
+                        flags,
+                        ref e,
+                        callback,
+                        state);
+
+                    arguments[1] = e;
+                    return result;
+                },
+                asyncResult =>
+                {
+                    var arguments = (object[])asyncResult.AsyncState;
+                    var s = (Socket)arguments[0];
+                    var e = (EndPoint)arguments[1];
+
+                    int bytesReceived = s.EndReceiveFrom(asyncResult, ref e);
+
+                    return new SocketReceiveFromResult()
+                    {
+                        ReceivedBytes = bytesReceived,
+                        RemoteEndPoint = e
+                    };
+                },
+                buffer,
+                socketFlags,
+                state: packedArguments);
+        }
+
+        public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(
+            this Socket socket,
+            ArraySegment<byte> buffer,
+            SocketFlags socketFlags,
+            EndPoint remoteEndPoint)
+        {
+            object[] packedArguments = new object[] { socket, socketFlags, remoteEndPoint };
+
+            return Task<SocketReceiveMessageFromResult>.Factory.FromAsync(
+                (targetBuffer, callback, state) =>
+                {
+                    var arguments = (object[])state;
+                    var s = (Socket)arguments[0];
+                    var f = (SocketFlags)arguments[1];
+                    var e = (EndPoint)arguments[2];
+
+                    IAsyncResult result = s.BeginReceiveMessageFrom(
+                        targetBuffer.Array,
+                        targetBuffer.Offset,
+                        targetBuffer.Count,
+                        f,
+                        ref e,
+                        callback,
+                        state);
+
+                    arguments[2] = e;
+                    return result;
+                },
+                asyncResult =>
+                {
+                    var arguments = (object[])asyncResult.AsyncState;
+                    var s = (Socket)arguments[0];
+                    var f = (SocketFlags)arguments[1];
+                    var e = (EndPoint)arguments[2];
+                    IPPacketInformation ipPacket;
+
+                    int bytesReceived = s.EndReceiveMessageFrom(
+                        asyncResult,
+                        ref f,
+                        ref e,
+                        out ipPacket);
+
+                    return new SocketReceiveMessageFromResult()
+                    {
+                        PacketInformation = ipPacket,
+                        ReceivedBytes = bytesReceived,
+                        RemoteEndPoint = e,
+                        SocketFlags = f
+                    };
+                },
+                buffer,
+                state: packedArguments);
+        }
+
+        public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffer, flags, callback, state) => ((Socket)state).BeginSend(
+                                                              targetBuffer.Array,
+                                                              targetBuffer.Offset,
+                                                              targetBuffer.Count,
+                                                              flags,
+                                                              callback,
+                                                              state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
+                buffer,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<int> SendAsync(
+            this Socket socket,
+            IList<ArraySegment<byte>> buffers,
+            SocketFlags socketFlags)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffers, flags, callback, state) => ((Socket)state).BeginSend(targetBuffers, flags, callback, state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
+                buffers,
+                socketFlags,
+                state: socket);
+        }
+
+        public static Task<int> SendToAsync(
+            this Socket socket,
+            ArraySegment<byte> buffer,
+            SocketFlags socketFlags,
+            EndPoint remoteEndPoint)
+        {
+            return Task<int>.Factory.FromAsync(
+                (targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
+                                                                        targetBuffer.Array,
+                                                                        targetBuffer.Offset,
+                                                                        targetBuffer.Count,
+                                                                        flags,
+                                                                        endPoint,
+                                                                        callback,
+                                                                        state),
+                asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
+                buffer,
+                socketFlags,
+                remoteEndPoint,
+                state: socket);
+        }
+    }
+}
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..a4cab35a66bc194d0b4d44ce6aba3335088ac771 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-
+SocketReceiveFromResult.cs
+SocketReceiveMessageFromResult.cs
+SocketTaskExtensions.cs
index cfa70ce24a5c460f9ae8f1c8efef1cff5afe3b63..a3dd7e7c887cf9bec3b64650356e8a5a17e7603f 100644 (file)
@@ -20,7 +20,6 @@
 // THE SOFTWARE.
 // 
 
-#if !FULL_AOT_RUNTIME
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.FlowControl))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCodes))]
@@ -28,7 +27,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OperandType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.PackingSize))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.StackBehaviour))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CallingConventions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventAttributes))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.FieldAttributes))]
diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/Requires.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/Requires.cs
new file mode 100644 (file)
index 0000000..339981b
--- /dev/null
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Reflection
+{
+    internal static class Requires
+    {
+        internal static void NotNull(object obj, string name)
+        {
+            if (obj == null)
+            {
+                throw new ArgumentNullException(name);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs
new file mode 100644 (file)
index 0000000..0a1ae28
--- /dev/null
@@ -0,0 +1,4 @@
+partial class SR
+{
+       public const string NoMetadataTokenAvailable = "There is no metadata token available for the given member.";
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/TypeExtensions.CoreCLR.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/TypeExtensions.CoreCLR.cs
new file mode 100644 (file)
index 0000000..661cd67
--- /dev/null
@@ -0,0 +1,400 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// NOTE: These are extension methods in the contract, but plain static methods
+// in this implementation. This is done to avoid confusion around what would 
+// look like infinite recursion in the implementation. Callers compiled against
+// the contract will still be able to invoke them as extension methods and get
+// source compatibility with classic reflection code.
+//
+// However, this does not apply if there is no 1:1 correspondence with an instance
+// in mscorlib. New extension methods should be marked with 'this'.
+
+namespace System.Reflection
+{
+    public static class TypeExtensions
+    {
+        public static ConstructorInfo GetConstructor(Type type, Type[] types)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetConstructor(types);
+        }
+
+        public static ConstructorInfo[] GetConstructors(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetConstructors();
+        }
+
+        public static ConstructorInfo[] GetConstructors(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetConstructors(bindingAttr);
+        }
+
+        public static MemberInfo[] GetDefaultMembers(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetDefaultMembers();
+        }
+
+        public static EventInfo GetEvent(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvent(name);
+        }
+
+        public static EventInfo GetEvent(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvent(name, bindingAttr);
+        }
+
+        public static EventInfo[] GetEvents(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvents();
+        }
+
+        public static EventInfo[] GetEvents(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetEvents(bindingAttr);
+        }
+
+        public static FieldInfo GetField(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetField(name);
+        }
+
+        public static FieldInfo GetField(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetField(name, bindingAttr);
+        }
+
+        public static FieldInfo[] GetFields(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetFields();
+        }
+
+        public static FieldInfo[] GetFields(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetFields(bindingAttr);
+        }
+
+        public static Type[] GetGenericArguments(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetGenericArguments();
+        }
+
+        public static Type[] GetInterfaces(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetInterfaces();
+        }
+
+        public static MemberInfo[] GetMember(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMember(name);
+        }
+
+        public static MemberInfo[] GetMember(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMember(name, bindingAttr);
+        }
+
+        public static MemberInfo[] GetMembers(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMembers();
+        }
+
+        public static MemberInfo[] GetMembers(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMembers(bindingAttr);
+        }
+
+        public static MethodInfo GetMethod(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethod(name);
+        }
+
+        public static MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethod(name, bindingAttr);
+        }
+
+        public static MethodInfo GetMethod(Type type, string name, Type[] types)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethod(name, types);
+        }
+
+        public static MethodInfo[] GetMethods(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethods();
+        }
+
+        public static MethodInfo[] GetMethods(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetMethods(bindingAttr);
+        }
+
+        public static Type GetNestedType(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetNestedType(name, bindingAttr);
+        }
+
+        public static Type[] GetNestedTypes(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetNestedTypes(bindingAttr);
+        }
+
+        public static PropertyInfo[] GetProperties(Type type)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperties();
+        }
+
+        public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperties(bindingAttr);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name, bindingAttr);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name, Type returnType)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name, returnType);
+        }
+
+        public static PropertyInfo GetProperty(Type type, string name, Type returnType, Type[] types)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.GetProperty(name, returnType, types);
+        }
+
+        public static bool IsAssignableFrom(Type type, Type c)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.IsAssignableFrom(c);
+        }
+
+        public static bool IsInstanceOfType(Type type, object o)
+        {
+            Requires.NotNull(type, nameof(type));
+            return type.IsInstanceOfType(o);
+        }
+    }
+
+    public static class AssemblyExtensions
+    {
+        public static Type[] GetExportedTypes(Assembly assembly)
+        {
+            Requires.NotNull(assembly, nameof(assembly));
+            return assembly.GetExportedTypes();
+        }
+
+        public static Module[] GetModules(Assembly assembly)
+        {
+            Requires.NotNull(assembly, nameof(assembly));
+            return assembly.GetModules();
+        }
+
+        public static Type[] GetTypes(Assembly assembly)
+        {
+            Requires.NotNull(assembly, nameof(assembly));
+            return assembly.GetTypes();
+        }
+    }
+
+    public static class EventInfoExtensions
+    {
+        public static MethodInfo GetAddMethod(EventInfo eventInfo)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetAddMethod();
+        }
+
+        public static MethodInfo GetAddMethod(EventInfo eventInfo, bool nonPublic)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetAddMethod(nonPublic);
+        }
+
+        public static MethodInfo GetRaiseMethod(EventInfo eventInfo)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRaiseMethod();
+        }
+
+        public static MethodInfo GetRaiseMethod(EventInfo eventInfo, bool nonPublic)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRaiseMethod(nonPublic);
+        }
+
+        public static MethodInfo GetRemoveMethod(EventInfo eventInfo)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRemoveMethod();
+        }
+
+        public static MethodInfo GetRemoveMethod(EventInfo eventInfo, bool nonPublic)
+        {
+            Requires.NotNull(eventInfo, nameof(eventInfo));
+            return eventInfo.GetRemoveMethod(nonPublic);
+        }
+    }
+
+    public static class MemberInfoExtensions
+    {
+
+        /// <summary>
+        /// Determines if there is a metadata token available for the given member.
+        /// <see cref="GetMetadataToken(MemberInfo)"/> throws <see cref="InvalidOperationException"/> otherwise.
+        /// </summary>
+        /// <remarks>This maybe</remarks>
+        public static bool HasMetadataToken(this MemberInfo member)
+        {
+            Requires.NotNull(member, nameof(member));
+
+            try
+            {
+                return GetMetadataTokenOrZeroOrThrow(member) != 0;
+            }
+            catch (InvalidOperationException)
+            {
+                // Thrown for unbaked ref-emit members/types. 
+                // Other cases such as typeof(byte[]).MetadataToken will be handled by comparison to zero above.
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// Gets a metadata token for the given member if available. The returned token is never nil.
+        /// </summary>
+        /// <exception cref="InvalidOperationException">
+        /// There is no metadata token available. <see cref="HasMetadataToken(MemberInfo)"/> returns false in this case.
+        /// </exception>
+        public static int GetMetadataToken(this MemberInfo member)
+        {
+            Requires.NotNull(member, nameof(member));
+
+            int token = GetMetadataTokenOrZeroOrThrow(member); 
+
+            if (token == 0)
+            {
+                throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
+            }
+
+            return token;
+        }
+
+        private static int GetMetadataTokenOrZeroOrThrow(MemberInfo member)
+        {
+            int token = member.MetadataToken;
+
+            // Tokens have MSB = table index, 3 LSBs = row index
+            // row index of 0 is a nil token 
+            const int rowMask = 0x00FFFFFF;
+            if ((token & rowMask) == 0)
+            {
+                // Nil token is returned for edge cases like typeof(byte[]).MetadataToken.
+                return 0;
+            }
+
+            return token;
+         }
+    }
+
+    public static class MethodInfoExtensions
+    {
+        public static MethodInfo GetBaseDefinition(MethodInfo method)
+        {
+            Requires.NotNull(method, nameof(method));
+            return method.GetBaseDefinition();
+        }
+    }
+
+    public static class ModuleExtensions
+    {
+        public static bool HasModuleVersionId(this Module module)
+        {
+            Requires.NotNull(module, nameof(module));
+            return true; // not expected to fail on platforms with Module.ModuleVersionId built-in.
+        }
+
+        public static Guid GetModuleVersionId(this Module module)
+        {
+            Requires.NotNull(module, nameof(module));
+            return module.ModuleVersionId;
+        }
+    }
+
+    public static class PropertyInfoExtensions
+    {
+        public static MethodInfo[] GetAccessors(PropertyInfo property)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetAccessors();
+        }
+
+        public static MethodInfo[] GetAccessors(PropertyInfo property, bool nonPublic)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetAccessors(nonPublic);
+        }
+
+        public static MethodInfo GetGetMethod(PropertyInfo property)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetGetMethod();
+        }
+
+        public static MethodInfo GetGetMethod(PropertyInfo property, bool nonPublic)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetGetMethod(nonPublic);
+        }
+
+        public static MethodInfo GetSetMethod(PropertyInfo property)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetSetMethod();
+        }
+
+        public static MethodInfo GetSetMethod(PropertyInfo property, bool nonPublic)
+        {
+            Requires.NotNull(property, nameof(property));
+            return property.GetSetMethod(nonPublic);
+        }
+    }
+}
index a6b0138ff61631688ad0fe624a0a658f1de2dc56..757cd13035567a34670186a13eee3f67dddff7f4 100644 (file)
@@ -22,8 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.BindingFlags))]
 
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventInfoExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodInfoExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.PropertyInfoExtensions))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeExtensions))]
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Formatters/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..9b92117
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Runtime.Serialization.Formatters.dll")]
+[assembly: AssemblyDescription ("System.Runtime.Serialization.Formatters.dll")]
+[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.Formatters.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/Makefile b/mcs/class/Facades/System.Runtime.Serialization.Formatters/Makefile
new file mode 100644 (file)
index 0000000..a8c237d
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Runtime.Serialization.Formatters
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Runtime.Serialization.Formatters.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.dll.sources b/mcs/class/Facades/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Formatters/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Serialization.Formatters/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..31daa7c
--- /dev/null
@@ -0,0 +1,32 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.NonSerializedAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IDeserializationCallback))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IFormatterConverter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.ISerializable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationEntry))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationInfoEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.SerializableAttribute))]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/ISerializationSurrogateProvider.cs b/mcs/class/Facades/System.Runtime.Serialization.Primitives/ISerializationSurrogateProvider.cs
new file mode 100644 (file)
index 0000000..b14b6df
--- /dev/null
@@ -0,0 +1,32 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+namespace System.Runtime.Serialization
+{
+       public interface ISerializationSurrogateProvider
+       {
+               object GetDeserializedObject (object obj, Type targetType);
+               object GetObjectToSerialize (object obj, Type targetType);
+               Type GetSurrogateType (Type type);
+       }
+}
+
index ce3180fe1f18b8bbb783db9d3df0d08ed6686efb..57b2d4db09ccb3689b3f37c1bf4f47cfcb634ab4 100644 (file)
@@ -33,4 +33,4 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.OnSerializingAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.StreamingContext))]
-
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.InvalidDataContractException))]
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/DataContractSerializerExtensions.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/DataContractSerializerExtensions.cs
new file mode 100644 (file)
index 0000000..3ccdff7
--- /dev/null
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#if !NO_CODEDOM
+using System.CodeDom;
+#endif
+using System.Collections.ObjectModel;
+using System.Reflection;
+
+namespace System.Runtime.Serialization
+{
+    public static class DataContractSerializerExtensions
+    {
+        public static ISerializationSurrogateProvider GetSerializationSurrogateProvider(this DataContractSerializer serializer) 
+        {
+            SurrogateProviderAdapter adapter = serializer.DataContractSurrogate as SurrogateProviderAdapter;
+            return (adapter == null) ? null : adapter.Provider;
+        }
+
+        public static void SetSerializationSurrogateProvider(this DataContractSerializer serializer, ISerializationSurrogateProvider provider)
+        {
+            // allocate every time, expectation is that this won't happen enough to warrant maintaining a CondtionalWeakTable.
+            IDataContractSurrogate adapter = new SurrogateProviderAdapter(provider);
+
+            // DCS doesn't expose a setter, access the field directly as a workaround
+            typeof(DataContractSerializer)
+              .GetField("dataContractSurrogate", BindingFlags.Instance | BindingFlags.NonPublic)
+              .SetValue(serializer, adapter);
+        }
+
+        private class SurrogateProviderAdapter : IDataContractSurrogate
+        {
+            private ISerializationSurrogateProvider _provider;
+            public SurrogateProviderAdapter(ISerializationSurrogateProvider provider)
+            {
+                _provider = provider;
+            }
+
+            public ISerializationSurrogateProvider Provider { get { return _provider; } }
+            public object GetCustomDataToExport(Type clrType, Type dataContractType)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+            public object GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+            public Type GetDataContractType(Type type)
+            {
+                return _provider.GetSurrogateType(type);
+            }
+
+            public object GetDeserializedObject(object obj, Type targetType)
+            {
+                return _provider.GetDeserializedObject(obj, targetType);
+            }
+
+            public void GetKnownCustomDataTypes(Collection<Type> customDataTypes)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+            public object GetObjectToSerialize(object obj, Type targetType)
+            {
+                return _provider.GetObjectToSerialize(obj, targetType);
+            }
+
+            public Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData)
+            {
+                throw NotImplemented.ByDesign;
+            }
+
+#if !NO_CODEDOM
+            public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit)
+            {
+                throw NotImplemented.ByDesign;
+            }
+#endif
+        }
+    }
+}
\ No newline at end of file
index 774289eb4de9e987c0368ce80e90d818c7b7ef7e..dc0a84d022933675423cf9435280d42f3c277367 100644 (file)
@@ -11,9 +11,13 @@ LIBRARY = System.Runtime.Serialization.Xml.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System.Runtime.Serialization System.Xml
+LIB_REFS = System System.Runtime.Serialization System.Xml Facades/System.Runtime.Serialization.Primitives
 LIB_MCS_FLAGS = $(SIGN_FLAGS) 
 
+ifeq (2.1, $(FRAMEWORK_VERSION))
+LIB_MCS_FLAGS += /d:NO_CODEDOM
+endif
+
 PLATFORM_DEBUG_FLAGS =
 
 NO_TEST = yes
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/NotImplemented.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/NotImplemented.cs
new file mode 100644 (file)
index 0000000..26e5342
--- /dev/null
@@ -0,0 +1,32 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System
+{
+    //
+    // This class enables one to throw a NotImplementedException using the following idiom:
+    //
+    //     throw NotImplemented.ByDesign;
+    //
+    // Used by methods whose intended implementation is to throw a NotImplementedException (typically
+    // virtual methods in public abstract classes that intended to be subclassed by third parties.)
+    //
+    // This makes it distinguishable both from human eyes and CCI from NYI's that truly represent undone work.
+    //
+    internal static class NotImplemented
+    {
+        internal static Exception ByDesign
+        {
+            get
+            {
+                return new NotImplementedException();
+            }
+        }
+
+        internal static Exception ByDesignWithMessage(String message)
+        {
+            return new NotImplementedException(message);
+        }
+    }
+}
\ No newline at end of file
index bfd4e7e471152d2a9dd1c7fbc18e223e53328c91..38eea612a4779c0ab2f3158a68820eff29a8e8ae 100644 (file)
@@ -36,3 +36,4 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryWriter))]
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.OnXmlDictionaryReaderClose))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryReaderQuotaTypes))]
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECCurve.cs
new file mode 100644 (file)
index 0000000..3e1733e
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// ECCurve.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+       public struct ECCurve
+       {
+               public byte[] A;
+               public byte[] B;
+               public byte[] Cofactor;
+               public ECCurveType CurveType;
+               public ECPoint G;
+               public HashAlgorithmName? Hash;
+               public byte[] Order;
+               public byte[] Polynomial;
+               public byte[] Prime;
+               public byte[] Seed;
+               public bool IsCharacteristic2 { get { throw new NotImplementedException (); } }
+               public bool IsExplicit { get { throw new NotImplementedException (); } }
+               public bool IsNamed { get { throw new NotImplementedException (); } }
+               public bool IsPrime { get { throw new NotImplementedException (); } }
+               public Oid Oid { get { throw new NotImplementedException (); } }
+               public static ECCurve CreateFromFriendlyName (string oidFriendlyName) { throw new NotImplementedException (); }
+               public static ECCurve CreateFromOid (Oid curveOid) { throw new NotImplementedException (); }
+               public static ECCurve CreateFromValue (string oidValue) { throw new NotImplementedException (); }
+               public void Validate () { throw new NotImplementedException (); }
+
+               public enum ECCurveType
+               {
+                       Implicit = 0,
+                       PrimeShortWeierstrass = 1,
+                       PrimeTwistedEdwards = 2,
+                       PrimeMontgomery = 3,
+                       Characteristic2 = 4,
+                       Named = 5,
+               }
+               
+               public static class NamedCurves
+               {
+                       public static ECCurve brainpoolP160r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP160t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP192r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP192t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP224r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP224t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP256r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP256t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP320r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP320t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP384r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP384t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP512r1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve brainpoolP512t1 { get { throw new NotImplementedException (); } }
+                       public static ECCurve nistP256 { get { throw new NotImplementedException (); } }
+                       public static ECCurve nistP384 { get { throw new NotImplementedException (); } }
+                       public static ECCurve nistP521 { get { throw new NotImplementedException (); } }
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECParameters.cs
new file mode 100644 (file)
index 0000000..6f1e421
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// ECPArameters.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public partial struct ECParameters
+    {
+        public ECCurve Curve;
+        public byte[] D;
+        public ECPoint Q;
+        public void Validate () { throw new NotImplementedException (); }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/ECPoint.cs
new file mode 100644 (file)
index 0000000..5693959
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// ECPoint.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+       public struct ECPoint
+       {
+               public byte[] X;
+               public byte[] Y;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs b/mcs/class/Facades/System.Security.Cryptography.Algorithms/IncrementalHash.cs
new file mode 100644 (file)
index 0000000..7b39b0d
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// IncrementalHash.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+    public sealed class IncrementalHash : IDisposable
+    {
+        private IncrementalHash () { }
+        public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
+        public void AppendData (byte[] data) { }
+        public void AppendData (byte[] data, int offset, int count) { }
+        public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
+        public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
+        public void Dispose () { }
+        public byte[] GetHashAndReset () { throw new NotImplementedException (); }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Cng/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..b902325
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Cng.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Cng.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Cng.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/Makefile b/mcs/class/Facades/System.Security.Cryptography.Cng/Makefile
new file mode 100644 (file)
index 0000000..4912aa3
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Cng
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Cng.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/System.Security.Cryptography.Cng.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Cng/System.Security.Cryptography.Cng.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..309d6fb
--- /dev/null
@@ -0,0 +1,46 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AesCng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngAlgorithmGroup))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngExportPolicies))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKey))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyBlobFormat))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyCreationOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyCreationParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyHandleOpenOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyOpenOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngKeyUsages))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngProperty))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngPropertyCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngPropertyOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIPolicy))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIProtectionLevels))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsaCng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSACng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDESCng))]
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Csp/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..0d63053
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Csp.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Csp.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Csp.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/Makefile b/mcs/class/Facades/System.Security.Cryptography.Csp/Makefile
new file mode 100644 (file)
index 0000000..91d0932
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Csp
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Csp.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/System.Security.Cryptography.Csp.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Csp/System.Security.Cryptography.Csp.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Csp/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Csp/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..a854f1f
--- /dev/null
@@ -0,0 +1,30 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CspKeyContainerInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CspParameters))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CspProviderFlags))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ICspAsymmetricAlgorithm))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.KeyNumber))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSACryptoServiceProvider))]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..3560bf2
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.OpenSsl.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.OpenSsl.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.OpenSsl.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/ECDsaOpenSsl.cs
new file mode 100644 (file)
index 0000000..1a2771a
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// ECDsaOpenSsl.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class ECDsaOpenSsl : ECDsa
+       {
+               public override byte[] SignHash (byte[] hash)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override bool VerifyHash (byte[] hash, byte[] signature)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               // TODO: Implement full contract API
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/Makefile
new file mode 100644 (file)
index 0000000..aa30bc9
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.OpenSsl
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.OpenSsl.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/RSAOpenSsl.cs
new file mode 100644 (file)
index 0000000..4bdcd80
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// RSAOpenSsl.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class RSAOpenSsl : RSA
+       {
+               public override RSAParameters ExportParameters (bool includePrivateParameters)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void ImportParameters (RSAParameters parameters)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override byte[] SignHash (byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override bool VerifyHash (byte[] hash, byte[] signature, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               // TODO: Implement full contract API
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/SafeEvpPKeyHandle.cs
new file mode 100644 (file)
index 0000000..85fd745
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// SafeEvpPKeyHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class SafeEvpPKeyHandle : System.Runtime.InteropServices.SafeHandle
+       {
+               public SafeEvpPKeyHandle (IntPtr handle, bool ownsHandle) 
+                       : base (handle, ownsHandle)
+               {
+               }
+
+               public override bool IsInvalid { get { throw new NotImplementedException (); } }
+
+               public SafeEvpPKeyHandle DuplicateHandle ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               protected override bool ReleaseHandle ()
+               {
+                       return true;
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources b/mcs/class/Facades/System.Security.Cryptography.OpenSsl/System.Security.Cryptography.OpenSsl.dll.sources
new file mode 100644 (file)
index 0000000..9e2bb4b
--- /dev/null
@@ -0,0 +1,4 @@
+AssemblyInfo.cs
+ECDsaOpenSsl.cs
+RSAOpenSsl.cs
+SafeEvpPKeyHandle.cs
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Cryptography.Pkcs/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..06089b3
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Security.Cryptography.Pkcs.dll")]
+[assembly: AssemblyDescription ("System.Security.Cryptography.Pkcs.dll")]
+[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Pkcs.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/Makefile b/mcs/class/Facades/System.Security.Cryptography.Pkcs/Makefile
new file mode 100644 (file)
index 0000000..b98a242
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Security.Cryptography.Pkcs
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Security.Cryptography.Pkcs.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System System.Security
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.dll.sources b/mcs/class/Facades/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Cryptography.Pkcs/TypeForwarders.cs b/mcs/class/Facades/System.Security.Cryptography.Pkcs/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..db96723
--- /dev/null
@@ -0,0 +1,51 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicAttributeObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicAttributeObjectCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptographicAttributeObjectEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.AlgorithmIdentifier))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Xml.X509IssuerSerial))]
+
+
index 8ce4172c8424c2774d4dcbc268df6062f4d85c46..ec9f05c624574ac277c87dea710a04280e2112c8 100644 (file)
@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 // 
 
-//TODO:[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IdentityNotMappedException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IdentityReference))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IdentityReferenceCollection))]
diff --git a/mcs/class/Facades/System.Security.SecureString/SecureStringMarshal.cs b/mcs/class/Facades/System.Security.SecureString/SecureStringMarshal.cs
new file mode 100644 (file)
index 0000000..59c85a4
--- /dev/null
@@ -0,0 +1,47 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+namespace System.Security
+{
+       public static class SecureStringMarshal
+       {
+               public static IntPtr SecureStringToCoTaskMemAnsi (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr SecureStringToCoTaskMemUnicode (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr SecureStringToGlobalAllocAnsi (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr SecureStringToGlobalAllocUnicode (SecureString s)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
index d8898cbe774bd16160e143039935f1044f732eff..4267f40e03b04ae637899d56dabe6b9413f7075f 100644 (file)
@@ -21,5 +21,3 @@
 // 
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecureString))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecureStringMarshal))]
index 89df05537785702076e7b0b9a3cf1831880c4e92..09d884b1527d2768307eaf03833fdba7358813c1 100644 (file)
@@ -20,9 +20,7 @@
 // THE SOFTWARE.
 // 
 
-#if !MOBILE && !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CallbackBehaviorAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DuplexChannelFactory<>))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DuplexClientBase<>))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.InstanceContext))]
index 57276e7078c989085ee8c8c27997dd707d8a0cdd..4aa28e9e49f0bc660137f259cfe73a0b8d799c84 100644 (file)
@@ -24,6 +24,9 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpMessageCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpSecurityMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpsBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpsSecurity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpsSecurityMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpRequestMessageProperty))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpResponseMessageProperty))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpsTransportBindingElement))]
@@ -35,5 +38,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpClientCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpTransportSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpsBinding))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpMessageEncoding))]
 
index a80d1c6fd126c5c9ffc8e0b8923fd9805bb0910e..f03bc06d93c1d117a36572cdb9a3b1f8c7b00d76 100644 (file)
@@ -20,7 +20,6 @@
 // THE SOFTWARE.
 // 
 
-#if !MOBILE && !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ConnectionOrientedTransportBindingElement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SslStreamSecurityBindingElement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TcpConnectionPoolSettings))]
@@ -30,5 +29,4 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetTcpBinding))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetTcpSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TcpTransportSecurity))]
-#endif
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TcpClientCredentialType))]
index 5f65e0599a30b14d256482f517c0ec7e66a5e4db..b89ba3525c8652877cf796a1b56edf2c72a59ed2 100644 (file)
@@ -11,7 +11,12 @@ LIBRARY = System.ServiceModel.Primitives.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System.ServiceModel System.Xml
+LIB_REFS = System System.ServiceModel System.Xml Facades/System.Security.Cryptography.X509Certificates
+
+ifneq (2.1, $(FRAMEWORK_VERSION))
+LIB_REFS += System.IdentityModel
+endif
+
 LIB_MCS_FLAGS = $(SIGN_FLAGS) 
 
 PLATFORM_DEBUG_FLAGS =
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..f43e364288ecdfe39cf6ad30ee2590de8b775429 100644 (file)
@@ -1,3 +1,9 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+X509ServiceCertificateAuthentication_mobile.cs
+X509CertificateValidator_mobile.cs
+X509CertificateValidationMode_mobile.cs
+X509CertificateRecipientClientCredential_mobile.cs
+X509CertificateInitiatorClientCredential_mobile.cs
index 38f834268c4ea888b5202436dcba723b72667add..b584fc0b8ee576cb82de3adc696344b0ee063b26 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractMemberAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeader<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageParameterAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContext))]
 [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
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateInitiatorClientCredential_mobile.cs
new file mode 100644 (file)
index 0000000..daf321c
--- /dev/null
@@ -0,0 +1,72 @@
+//
+// X509CertificateInitiatorClientCredential_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateRecipientClientCredential_mobile.cs
new file mode 100644 (file)
index 0000000..3545b72
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// X509CertificateRecipientClientCredential_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidationMode_mobile.cs
new file mode 100644 (file)
index 0000000..34b1d24
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// X509CertificateValidationMode_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509CertificateValidator_mobile.cs
new file mode 100644 (file)
index 0000000..734e990
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// X509CertificateValidator_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs b/mcs/class/Facades/System.ServiceModel.Primitives/X509ServiceCertificateAuthentication_mobile.cs
new file mode 100644 (file)
index 0000000..725cbd9
--- /dev/null
@@ -0,0 +1,95 @@
+//
+// X509ServiceCertificateAuthentication_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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
\ No newline at end of file
index 61d5b5a04468de6b95b1eac09e189e718aee5d87..a11a6f59a06ab3d71757b8bea625794700b88c2f 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityBindingElement))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityHeaderLayout))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportSecurityBindingElement))]
-#if !MOBILE
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DnsEndpointIdentity))]
-#if !XAMMAC_4_5
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageSecurityVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.BasicSecurityProfileVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecureConversationVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityPolicyVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SecureConversationSecurityTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SecurityTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.SupportingTokenParameters))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.Tokens.UserNameSecurityTokenParameters))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))]
-#endif
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))]
-#endif
index 2724a34a105c35861c75080253a8dbf96d954e99..5fa4c609b0ba9bf81b857a8c688e79cfb7f3ae6f 100644 (file)
@@ -11,7 +11,14 @@ LIBRARY = System.ServiceProcess.ServiceController.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.ServiceProcess
+LIB_REFS = System
+
+ifneq (2.1, $(FRAMEWORK_VERSION))
+ifndef XAMMAC_4_5
+LIB_REFS += System.ServiceProcess
+endif
+endif
+
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 PLATFORM_DEBUG_FLAGS =
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceControllerStatus_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceControllerStatus_mobile.cs
new file mode 100644 (file)
index 0000000..f233c8b
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// ServiceControllerStatus_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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;
+
+namespace System.ServiceProcess
+{
+       public enum ServiceControllerStatus
+       {
+               ContinuePending = 5,
+               Paused = 7,
+               PausePending = 6,
+               Running = 4,
+               StartPending = 2,
+               Stopped = 1,
+               StopPending = 3
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceController_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceController_mobile.cs
new file mode 100644 (file)
index 0000000..f84a27d
--- /dev/null
@@ -0,0 +1,246 @@
+//
+// ServiceController_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.Runtime.InteropServices;
+
+namespace System.ServiceProcess
+{
+       public class ServiceController : IDisposable
+       {
+               [MonoTODO]
+               public bool CanPauseAndContinue
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public bool CanShutdown
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public bool CanStop
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceController[] DependentServices
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public string DisplayName
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public string MachineName
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public SafeHandle ServiceHandle
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public string ServiceName
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceController[] ServicesDependedOn
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceType ServiceType
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceStartMode StartType
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceControllerStatus Status
+               {
+                       get
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               [MonoTODO]
+               public ServiceController (string name)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public ServiceController (string name, string machineName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Continue ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Dispose ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual void Dispose (bool disposing)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetDevices ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetDevices (string machineName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetServices ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static ServiceController[] GetServices (string machineName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Pause ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Refresh ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Start ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Start (string[] args)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Stop ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void WaitForStatus (ServiceControllerStatus desiredStatus)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void WaitForStatus (ServiceControllerStatus desiredStatus, TimeSpan timeout)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceStartMode_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceStartMode_mobile.cs
new file mode 100644 (file)
index 0000000..3c875c3
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ServiceStartMode_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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;
+
+namespace System.ServiceProcess
+{
+       public enum ServiceStartMode
+       {
+               Automatic = 2,
+               Boot = 0,
+               Disabled = 4,
+               Manual = 3,
+               System = 1
+       }
+}
+
+#endif
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceType_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/ServiceType_mobile.cs
new file mode 100644 (file)
index 0000000..ba4f144
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// ServiceType_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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;
+
+namespace System.ServiceProcess
+{
+       [Flags]
+       public enum ServiceType
+       {
+               Adapter = 4,
+               FileSystemDriver = 2,
+               InteractiveProcess = 256,
+               KernelDriver = 1,
+               RecognizerDriver = 8,
+               Win32OwnProcess = 16,
+               Win32ShareProcess = 32
+       }
+}
+
+#endif
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..56e080d93c71d2f98ec884932141f6130b6e1a11 100644 (file)
@@ -1,3 +1,9 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+ServiceController_mobile.cs
+ServiceControllerStatus_mobile.cs
+ServiceStartMode_mobile.cs
+ServiceType_mobile.cs
+TimeoutException_mobile.cs
diff --git a/mcs/class/Facades/System.ServiceProcess.ServiceController/TimeoutException_mobile.cs b/mcs/class/Facades/System.ServiceProcess.ServiceController/TimeoutException_mobile.cs
new file mode 100644 (file)
index 0000000..c6448d8
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// TimeoutException_mobile.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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;
+
+namespace System.ServiceProcess
+{
+       public class TimeoutException : Exception
+       {
+               [MonoTODO]
+               public TimeoutException ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public TimeoutException (string message)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public TimeoutException (string message, Exception innerException)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index 6a21dfc46f16d0792d9767b3c339f812719ff881..b14584243c26246101e1057892c5015b3beedf59 100644 (file)
 // THE SOFTWARE.
 // 
 
+#if !MOBILE && !XAMMAC_4_5
+
+// TODO: These are implemented as stubs in the facade directly on mobile 
+
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceController))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceControllerStatus))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceStartMode))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.ServiceType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceProcess.TimeoutException))]
 
-
+#endif
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding.CodePages/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..568942d
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Text.Encoding.CodePages.dll")]
+[assembly: AssemblyDescription ("System.Text.Encoding.CodePages.dll")]
+[assembly: AssemblyDefaultAlias ("System.Text.Encoding.CodePages.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/CodePagesEncodingProvider.cs b/mcs/class/Facades/System.Text.Encoding.CodePages/CodePagesEncodingProvider.cs
new file mode 100644 (file)
index 0000000..d97ad54
--- /dev/null
@@ -0,0 +1,37 @@
+// 
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+// 
+
+namespace System.Text
+{
+       public sealed partial class CodePagesEncodingProvider
+       {
+               private CodePagesEncodingProvider ()
+               {
+               }
+               
+               public static System.Text.EncodingProvider Instance { 
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/Makefile b/mcs/class/Facades/System.Text.Encoding.CodePages/Makefile
new file mode 100644 (file)
index 0000000..7430a65
--- /dev/null
@@ -0,0 +1,23 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Text.Encoding.CodePages
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Text.Encoding.CodePages.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.dll.sources b/mcs/class/Facades/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.dll.sources
new file mode 100644 (file)
index 0000000..db2c267
--- /dev/null
@@ -0,0 +1,2 @@
+AssemblyInfo.cs
+CodePagesEncodingProvider.cs
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..0d28c343986eccda5535c44d498db69ce8ebe08e 100644 (file)
@@ -1,3 +1,5 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+../../../build/common/MonoTODOAttribute.cs
+ThreadingAclExtensions.cs
diff --git a/mcs/class/Facades/System.Threading.AccessControl/ThreadingAclExtensions.cs b/mcs/class/Facades/System.Threading.AccessControl/ThreadingAclExtensions.cs
new file mode 100644 (file)
index 0000000..af61a50
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// ThreadingAclExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Security.AccessControl;
+using System.Diagnostics.Contracts;
+
+namespace System.Threading
+{
+    public static class ThreadingAclExtensions
+    {
+        [MonoTODO]
+        public static EventWaitHandleSecurity GetAccessControl (EventWaitHandle handle)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static void SetAccessControl (EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static MutexSecurity GetAccessControl (Mutex mutex)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static void SetAccessControl (Mutex mutex, MutexSecurity mutexSecurity)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static SemaphoreSecurity GetAccessControl (Semaphore semaphore)
+        {
+            throw new NotImplementedException ();
+        }
+
+        [MonoTODO]
+        public static void SetAccessControl (Semaphore semaphore, SemaphoreSecurity semaphoreSecurity)
+        {
+            throw new NotImplementedException ();
+        }
+    }
+}
\ No newline at end of file
index 8871794f349eda4ffb387ac87098498bfc9ca7a6..02fbd79cc8f8358c1719bd402b0d4c30ac5fe365 100644 (file)
@@ -33,4 +33,3 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.SemaphoreRights))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.SemaphoreSecurity))]
 
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadingAclExtensions))]
diff --git a/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandle.cs b/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandle.cs
new file mode 100644 (file)
index 0000000..40253fb
--- /dev/null
@@ -0,0 +1,315 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace System.Threading
+{
+    //
+    // Implementation of ThreadPoolBoundHandle that sits on top of the CLR's ThreadPool and Overlapped infrastructure
+    //
+
+    /// <summary>
+    ///     Represents an I/O handle that is bound to the system thread pool and enables low-level
+    ///     components to receive notifications for asynchronous I/O operations.
+    /// </summary>
+    public sealed partial class ThreadPoolBoundHandle : IDisposable
+    {
+        private readonly SafeHandle _handle;
+        private bool _isDisposed;
+
+        private ThreadPoolBoundHandle(SafeHandle handle)
+        {
+            _handle = handle;
+        }
+
+        /// <summary>
+        ///     Gets the bound operating system handle.
+        /// </summary>
+        /// <value>
+        ///     A <see cref="SafeHandle"/> object that holds the bound operating system handle.
+        /// </value>
+        public SafeHandle Handle
+        {
+            get { return _handle; }
+        }
+
+        /// <summary>
+        ///     Returns a <see cref="ThreadPoolBoundHandle"/> for the specific handle, 
+        ///     which is bound to the system thread pool.
+        /// </summary>
+        /// <param name="handle">
+        ///     A <see cref="SafeHandle"/> object that holds the operating system handle. The 
+        ///     handle must have been opened for overlapped I/O on the unmanaged side.
+        /// </param>
+        /// <returns>
+        ///     <see cref="ThreadPoolBoundHandle"/> for <paramref name="handle"/>, which 
+        ///     is bound to the system thread pool.
+        /// </returns>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="handle"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ArgumentException">
+        ///     <paramref name="handle"/> has been disposed.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <paramref name="handle"/> does not refer to a valid I/O handle.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <paramref name="handle"/> refers to a handle that has not been opened 
+        ///     for overlapped I/O.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <paramref name="handle"/> refers to a handle that has already been bound.
+        /// </exception>
+        /// <remarks>
+        ///     This method should be called once per handle.
+        ///     <para>
+        ///         -or-
+        ///     </para>
+        ///     <see cref="ThreadPoolBoundHandle"/> does not take ownership of <paramref name="handle"/>, 
+        ///     it remains the responsibility of the caller to call <see cref="SafeHandle.Dispose"/>.
+        /// </remarks>
+        public static ThreadPoolBoundHandle BindHandle(SafeHandle handle)
+        {
+            if (handle == null)
+                throw new ArgumentNullException(nameof(handle));
+
+            if (handle.IsClosed || handle.IsInvalid)
+                throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
+
+            try
+            {
+                // ThreadPool.BindHandle will always return true, otherwise, it throws. See the underlying FCall
+                // implementation in ThreadPoolNative::CorBindIoCompletionCallback to see the implementation.
+                bool succeeded = ThreadPool.BindHandle(handle);
+                Debug.Assert(succeeded);
+            }
+            catch (Exception ex)
+            {   // BindHandle throws ApplicationException on full CLR and Exception on CoreCLR.
+                // We do not let either of these leak and convert them to ArgumentException to 
+                // indicate that the specified handles are invalid.
+
+                if (ex.HResult == System.HResults.E_HANDLE)         // Bad handle
+                    throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
+
+                if (ex.HResult == System.HResults.E_INVALIDARG)     // Handle already bound or sync handle
+                    throw new ArgumentException(SR.Argument_AlreadyBoundOrSyncHandle, nameof(handle));
+
+                throw;
+            }
+
+            return new ThreadPoolBoundHandle(handle);
+        }
+
+        /// <summary>
+        ///     Returns an unmanaged pointer to a <see cref="NativeOverlapped"/> structure, specifying 
+        ///     a delegate that is invoked when the asynchronous I/O operation is complete, a user-provided 
+        ///     object providing context, and managed objects that serve as buffers.
+        /// </summary>
+        /// <param name="callback">
+        ///     An <see cref="IOCompletionCallback"/> delegate that represents the callback method 
+        ///     invoked when the asynchronous I/O operation completes.
+        /// </param>
+        /// <param name="state">
+        ///     A user-provided object that distinguishes this <see cref="NativeOverlapped"/> from other 
+        ///     <see cref="NativeOverlapped"/> instances. Can be <see langword="null"/>.
+        /// </param>
+        /// <param name="pinData">
+        ///     An object or array of objects representing the input or output buffer for the operation. Each 
+        ///     object represents a buffer, for example an array of bytes.  Can be <see langword="null"/>.
+        /// </param>
+        /// <returns>
+        ///     An unmanaged pointer to a <see cref="NativeOverlapped"/> structure.
+        /// </returns>
+        /// <remarks>
+        ///     <para>
+        ///         The unmanaged pointer returned by this method can be passed to the operating system in 
+        ///         overlapped I/O operations. The <see cref="NativeOverlapped"/> structure is fixed in 
+        ///         physical memory until <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> is called.
+        ///     </para>
+        ///     <para>
+        ///         The buffer or buffers specified in <paramref name="pinData"/> must be the same as those passed 
+        ///         to the unmanaged operating system function that performs the asynchronous I/O.
+        ///     </para>
+        ///     <note>
+        ///         The buffers specified in <paramref name="pinData"/> are pinned for the duration of 
+        ///         the I/O operation.
+        ///     </note>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="callback"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed.
+        /// </exception>
+        public unsafe NativeOverlapped* AllocateNativeOverlapped(IOCompletionCallback callback, object state, object pinData)
+        {
+            if (callback == null)
+                throw new ArgumentNullException(nameof(callback));
+
+            EnsureNotDisposed();
+
+            ThreadPoolBoundHandleOverlapped overlapped = new ThreadPoolBoundHandleOverlapped(callback, state, pinData, preAllocated: null);
+            overlapped._boundHandle = this;
+            return overlapped._nativeOverlapped;
+        }
+
+        /// <summary>
+        ///     Returns an unmanaged pointer to a <see cref="NativeOverlapped"/> structure, using the callback,
+        ///     state, and buffers associated with the specified <see cref="PreAllocatedOverlapped"/> object.
+        /// </summary>
+        /// <param name="preAllocated">
+        ///     A <see cref="PreAllocatedOverlapped"/> object from which to create the NativeOverlapped pointer.
+        /// </param>
+        /// <returns>
+        ///     An unmanaged pointer to a <see cref="NativeOverlapped"/> structure.
+        /// </returns>
+        /// <remarks>
+        ///     <para>
+        ///         The unmanaged pointer returned by this method can be passed to the operating system in 
+        ///         overlapped I/O operations. The <see cref="NativeOverlapped"/> structure is fixed in 
+        ///         physical memory until <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> is called.
+        ///     </para>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="preAllocated"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ArgumentException">
+        ///     <paramref name="preAllocated"/> is currently in use for another I/O operation.  
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed, or 
+        ///     this method was called after <paramref name="preAllocated"/> was disposed.
+        /// </exception>
+        /// <seealso cref="PreAllocatedOverlapped"/>
+        public unsafe NativeOverlapped* AllocateNativeOverlapped(PreAllocatedOverlapped preAllocated)
+        {
+            if (preAllocated == null)
+                throw new ArgumentNullException(nameof(preAllocated));
+
+            EnsureNotDisposed();
+
+            preAllocated.AddRef();
+            try
+            {
+                ThreadPoolBoundHandleOverlapped overlapped = preAllocated._overlapped;
+
+                if (overlapped._boundHandle != null)
+                    throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, nameof(preAllocated));
+
+                overlapped._boundHandle = this;
+
+                return overlapped._nativeOverlapped;
+            }
+            catch
+            {
+                preAllocated.Release();
+                throw;
+            }
+        }
+
+        /// <summary>
+        ///     Frees the unmanaged memory associated with a <see cref="NativeOverlapped"/> structure 
+        ///     allocated by the <see cref="AllocateNativeOverlapped"/> method.
+        /// </summary>
+        /// <param name="overlapped">
+        ///     An unmanaged pointer to the <see cref="NativeOverlapped"/> structure to be freed.
+        /// </param>
+        /// <remarks>
+        ///     <note type="caution">
+        ///         You must call the <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> method exactly once 
+        ///         on every <see cref="NativeOverlapped"/> unmanaged pointer allocated using the 
+        ///         <see cref="AllocateNativeOverlapped"/> method. 
+        ///         If you do not call the <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> method, you will 
+        ///         leak memory. If you call the <see cref="FreeNativeOverlapped(NativeOverlapped*)"/> method more 
+        ///         than once on the same <see cref="NativeOverlapped"/> unmanaged pointer, memory will be corrupted.
+        ///     </note>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="overlapped"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed.
+        /// </exception>
+        public unsafe void FreeNativeOverlapped(NativeOverlapped* overlapped)
+        {
+            if (overlapped == null)
+                throw new ArgumentNullException(nameof(overlapped));
+
+            // Note: we explicitly allow FreeNativeOverlapped calls after the ThreadPoolBoundHandle has been Disposed.
+
+            ThreadPoolBoundHandleOverlapped wrapper = GetOverlappedWrapper(overlapped, this);
+
+            if (wrapper._boundHandle != this)
+                throw new ArgumentException(SR.Argument_NativeOverlappedWrongBoundHandle, nameof(overlapped));
+
+            if (wrapper._preAllocated != null)
+                wrapper._preAllocated.Release();
+            else
+                Overlapped.Free(overlapped);
+        }
+
+        /// <summary>
+        ///     Returns the user-provided object specified when the <see cref="NativeOverlapped"/> instance was
+        ///     allocated using the <see cref="AllocateNativeOverlapped(IOCompletionCallback, object, byte[])"/>.
+        /// </summary>
+        /// <param name="overlapped">
+        ///     An unmanaged pointer to the <see cref="NativeOverlapped"/> structure from which to return the 
+        ///     asscociated user-provided object.
+        /// </param>
+        /// <returns>
+        ///     A user-provided object that distinguishes this <see cref="NativeOverlapped"/> 
+        ///     from other <see cref="NativeOverlapped"/> instances, otherwise, <see langword="null"/> if one was 
+        ///     not specified when the instance was allocated using <see cref="AllocateNativeOverlapped"/>.
+        /// </returns>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="overlapped"/> is <see langword="null"/>.
+        /// </exception>
+        public unsafe static object GetNativeOverlappedState(NativeOverlapped* overlapped)
+        {
+            if (overlapped == null)
+                throw new ArgumentNullException(nameof(overlapped));
+
+            ThreadPoolBoundHandleOverlapped wrapper = GetOverlappedWrapper(overlapped, null);
+            Debug.Assert(wrapper._boundHandle != null);
+            return wrapper._userState;
+        }
+
+        private static unsafe ThreadPoolBoundHandleOverlapped GetOverlappedWrapper(NativeOverlapped* overlapped, ThreadPoolBoundHandle expectedBoundHandle)
+        {
+            ThreadPoolBoundHandleOverlapped wrapper;
+            try
+            {
+                wrapper = (ThreadPoolBoundHandleOverlapped)Overlapped.Unpack(overlapped);
+            }
+            catch (NullReferenceException ex)
+            {
+                throw new ArgumentException(SR.Argument_NativeOverlappedAlreadyFree, nameof(overlapped), ex);
+            }
+
+            return wrapper;
+        }
+
+        public void Dispose()
+        {
+            // .NET Native's version of ThreadPoolBoundHandle that wraps the Win32 ThreadPool holds onto
+            // native resources so it needs to be disposable. To match the contract, we are also disposable.
+            // We also implement a disposable state to mimic behavior between this implementation and 
+            // .NET Native's version (code written against us, will also work against .NET Native's version).
+            _isDisposed = true;
+        }
+
+
+        private void EnsureNotDisposed()
+        {
+            if (_isDisposed)
+                throw new ObjectDisposedException(GetType().ToString());
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandleOverlapped.cs b/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolBoundHandleOverlapped.cs
new file mode 100644 (file)
index 0000000..2245254
--- /dev/null
@@ -0,0 +1,50 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Threading
+{
+    /// <summary>
+    /// Overlapped subclass adding data needed by ThreadPoolBoundHandle.
+    /// </summary>
+    internal sealed class ThreadPoolBoundHandleOverlapped : Overlapped
+    {
+        private readonly IOCompletionCallback _userCallback;
+        internal readonly object _userState;
+        internal PreAllocatedOverlapped _preAllocated;
+        internal unsafe NativeOverlapped* _nativeOverlapped;
+        internal ThreadPoolBoundHandle _boundHandle;
+        internal bool _completed;
+
+        public unsafe ThreadPoolBoundHandleOverlapped(IOCompletionCallback callback, object state, object pinData, PreAllocatedOverlapped preAllocated)
+        {
+            _userCallback = callback;
+            _userState = state;
+            _preAllocated = preAllocated;
+
+            _nativeOverlapped = Pack(CompletionCallback, pinData);
+            _nativeOverlapped->OffsetLow = 0;        // CLR reuses NativeOverlapped instances and does not reset these
+            _nativeOverlapped->OffsetHigh = 0;
+        }
+
+        private unsafe static void CompletionCallback(uint errorCode, uint numBytes, NativeOverlapped* nativeOverlapped)
+        {
+            ThreadPoolBoundHandleOverlapped overlapped = (ThreadPoolBoundHandleOverlapped)Overlapped.Unpack(nativeOverlapped);
+
+            //
+            // The Win32 thread pool implementation of ThreadPoolBoundHandle does not permit reuse of NativeOverlapped
+            // pointers without freeing them and allocating new a new one.  We need to ensure that code using the CLR
+            // ThreadPool implementation follows those rules.
+            //
+            if (overlapped._completed)
+                throw new InvalidOperationException(SR.InvalidOperation_NativeOverlappedReused);
+
+            overlapped._completed = true;
+
+            if (overlapped._boundHandle == null)
+                throw new InvalidOperationException(SR.Argument_NativeOverlappedAlreadyFree);
+
+            overlapped._userCallback(errorCode, numBytes, nativeOverlapped);
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolPreAllocatedOverlapped.cs b/mcs/class/Facades/System.Threading.Overlapped/ClrThreadPoolPreAllocatedOverlapped.cs
new file mode 100644 (file)
index 0000000..dfc7d47
--- /dev/null
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Threading
+{
+    /// <summary>
+    /// Represents pre-allocated state for native overlapped I/O operations.
+    /// </summary>
+    /// <seealso cref="ThreadPoolBoundHandle.AllocateNativeOverlapped(PreAllocatedOverlapped)"/>
+    public sealed class PreAllocatedOverlapped : IDisposable, IDeferredDisposable
+    {
+        internal readonly ThreadPoolBoundHandleOverlapped _overlapped;
+        private DeferredDisposableLifetime<PreAllocatedOverlapped> _lifetime;
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="PreAllocatedOverlapped"/> class, specifying 
+        ///     a delegate that is invoked when each asynchronous I/O operation is complete, a user-provided 
+        ///     object providing context, and managed objects that serve as buffers.
+        /// </summary>
+        /// <param name="callback">
+        ///     An <see cref="IOCompletionCallback"/> delegate that represents the callback method 
+        ///     invoked when each asynchronous I/O operation completes.
+        /// </param>
+        /// <param name="state">
+        ///     A user-provided object that distinguishes <see cref="NativeOverlapped"/> instance produced from this
+        ///     object from other <see cref="NativeOverlapped"/> instances. Can be <see langword="null"/>.
+        /// </param>
+        /// <param name="pinData">
+        ///     An object or array of objects representing the input or output buffer for the operations. Each 
+        ///     object represents a buffer, for example an array of bytes.  Can be <see langword="null"/>.
+        /// </param>
+        /// <remarks>
+        ///     The new <see cref="PreAllocatedOverlapped"/> instance can be passed to 
+        ///     <see cref="ThreadPoolBoundHandle.AllocateNativeOverlapped(PreAllocatedOverlapped)"/>, to produce
+        ///     a <see cref="NativeOverlapped"/> instance that can be passed to the operating system in overlapped
+        ///     I/O operations.  A single <see cref="PreAllocatedOverlapped"/> instance can only be used for 
+        ///     a single native I/O operation at a time.  However, the state stored in the <see cref="PreAllocatedOverlapped"/>
+        ///     instance can be reused for subsequent native operations.
+        ///     <note>
+        ///         The buffers specified in <paramref name="pinData"/> are pinned until <see cref="Dispose"/> is called.
+        ///     </note>
+        /// </remarks>
+        /// <exception cref="ArgumentNullException">
+        ///     <paramref name="callback"/> is <see langword="null"/>.
+        /// </exception>
+        /// <exception cref="ObjectDisposedException">
+        ///     This method was called after the <see cref="ThreadPoolBoundHandle"/> was disposed.
+        /// </exception>
+        public unsafe PreAllocatedOverlapped(IOCompletionCallback callback, object state, object pinData)
+        {
+            if (callback == null)
+                throw new ArgumentNullException(nameof(callback));
+
+            _overlapped = new ThreadPoolBoundHandleOverlapped(callback, state, pinData, this);
+        }
+
+        internal bool AddRef()
+        {
+            return _lifetime.AddRef(this);
+        }
+
+        internal void Release()
+        {
+            _lifetime.Release(this);
+        }
+
+        /// <summary>
+        /// Frees the resources associated with this <see cref="PreAllocatedOverlapped"/> instance. 
+        /// </summary>
+        public unsafe void Dispose()
+        {
+            _lifetime.Dispose(this);
+            GC.SuppressFinalize(this);
+        }
+
+        ~PreAllocatedOverlapped()
+        {
+            //
+            // During shutdown, don't automatically clean up, because this instance may still be
+            // reachable/usable by other code.
+            //
+            if (!Environment.HasShutdownStarted)
+                Dispose();
+        }
+
+        unsafe void IDeferredDisposable.OnFinalRelease(bool disposed)
+        {
+            if (_overlapped != null)
+            {
+                if (disposed)
+                {
+                    Overlapped.Free(_overlapped._nativeOverlapped);
+                }
+                else
+                {
+                    _overlapped._boundHandle = null;
+                    _overlapped._completed = false;
+                    *_overlapped._nativeOverlapped = default(NativeOverlapped);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/DeferredDisposableLifetime.cs b/mcs/class/Facades/System.Threading.Overlapped/DeferredDisposableLifetime.cs
new file mode 100644 (file)
index 0000000..2450906
--- /dev/null
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Diagnostics;
+
+namespace System.Threading
+{
+    /// <summary>
+    /// Provides callbacks to objects whose lifetime is managed by <see cref="DeferredDisposableLifetime{T}"/>.
+    /// </summary>
+    internal interface IDeferredDisposable
+    {
+        /// <summary>
+        /// Called when the object's refcount reaches zero.
+        /// </summary>
+        /// <param name="disposed">
+        /// Indicates whether the object has been disposed.
+        /// </param>
+        /// <remarks>
+        /// If the refount reaches zero before the object is disposed, this method will be called with
+        /// <paramref name="disposed"/> set to false.  If the object is then disposed, this method will be
+        /// called again, with <paramref name="disposed"/> set to true.  If the refcount reaches zero
+        /// after the object has already been disposed, this will be called a single time, with 
+        /// <paramref name="disposed"/> set to true.
+        /// </remarks>
+        void OnFinalRelease(bool disposed);
+    }
+
+    /// <summary>
+    /// Manages the lifetime of an object which implements IDisposable, but which must defer the actual
+    /// cleanup of state until all existing uses of the object are complete.
+    /// </summary>
+    /// <typeparam name="T">The type of object whose lifetime will be managed.</typeparam>
+    /// <remarks>
+    /// This type maintains a reference count, and tracks whether the object has been disposed.  When
+    /// Callbacks are made to <see cref="IDeferredDisposable.OnFinalRelease(bool)"/> when the refcount
+    /// reaches zero.  Objects that need to defer cleanup until they have been disposed *and* they have
+    /// no more references can do so in <see cref="IDeferredDisposable.OnFinalRelease(bool)"/> when
+    /// 'disposed' is true.
+    /// </remarks>
+    internal struct DeferredDisposableLifetime<T> where T : class, IDeferredDisposable
+    {
+        //
+        // _count is positive until Dispose is called, after which it's (-1 - refcount).
+        //
+        private int _count;
+
+        public bool AddRef(T obj)
+        {
+            while (true)
+            {
+                int oldCount = Volatile.Read(ref _count);
+
+                // Have we been disposed?
+                if (oldCount < 0)
+                    throw new ObjectDisposedException(typeof(T).ToString());
+
+                int newCount = checked(oldCount + 1);
+
+                if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                    return true;
+            }
+        }
+
+        public void Release(T obj)
+        {
+            while (true)
+            {
+                int oldCount = Volatile.Read(ref _count);
+                if (oldCount > 0)
+                {
+                    // We haven't been disposed.  Decrement _count.
+                    int newCount = oldCount - 1;
+                    if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                    {
+                        if (newCount == 0)
+                            obj.OnFinalRelease(disposed: false);
+                        return;
+                    }
+                }
+                else
+                {
+                    Debug.Assert(oldCount != 0 && oldCount != -1);
+
+                    // We've been disposed.  Increment _count.
+                    int newCount = oldCount + 1;
+                    if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                    {
+                        if (newCount == -1)
+                            obj.OnFinalRelease(disposed: true);
+                        return;
+                    }
+                }
+            }
+        }
+
+        public void Dispose(T obj)
+        {
+            while (true)
+            {
+                int oldCount = Volatile.Read(ref _count);
+                if (oldCount < 0)
+                    return; // already disposed
+
+                int newCount = -1 - oldCount;
+                if (Interlocked.CompareExchange(ref _count, newCount, oldCount) == oldCount)
+                {
+                    if (newCount == -1)
+                        obj.OnFinalRelease(disposed: true);
+                    return;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/Facades/System.Threading.Overlapped/HResults.cs b/mcs/class/Facades/System.Threading.Overlapped/HResults.cs
new file mode 100644 (file)
index 0000000..ef9a772
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// HResults.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+namespace System
+{
+       internal static class HResults
+       {
+               internal const int E_HANDLE = unchecked((int)0x80070006);
+               internal const int E_INVALIDARG = unchecked((int)0x80070057);
+       }
+}
\ No newline at end of file
index 460fb4aff26d042fd0beb0c5b8bb7cd8ced7eb27..061c46b236be0470d5f3818dc7a59b00709e404c 100644 (file)
@@ -12,7 +12,7 @@ LIBRARY = System.Threading.Overlapped.dll
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
 LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) 
+LIB_MCS_FLAGS = $(SIGN_FLAGS) -unsafe
 
 PLATFORM_DEBUG_FLAGS =
 
diff --git a/mcs/class/Facades/System.Threading.Overlapped/SR.cs b/mcs/class/Facades/System.Threading.Overlapped/SR.cs
new file mode 100644 (file)
index 0000000..a65446d
--- /dev/null
@@ -0,0 +1,11 @@
+// strings taken from corefx
+
+class SR
+{
+       public const string Argument_AlreadyBoundOrSyncHandle = "'handle' has already been bound to the thread pool, or was not opened for asynchronous I/O.";
+       public const string Argument_InvalidHandle = "'handle' has been disposed or is an invalid handle.";
+       public const string Argument_NativeOverlappedAlreadyFree = "'overlapped' has already been freed.";
+       public const string Argument_NativeOverlappedWrongBoundHandle = "'overlapped' was not allocated by this ThreadPoolBoundHandle instance.";
+       public const string Argument_PreAllocatedAlreadyAllocated = "'preAllocated' is already in use.";
+       public const string InvalidOperation_NativeOverlappedReused = "NativeOverlapped cannot be reused for multiple operations.";
+}
\ No newline at end of file
index 8e33d4ddeae92bde7aa8afd994db5d90d6af18d9..eb1041a8bbb8cb2a919944f2b2a41a379d579704 100644 (file)
@@ -1,3 +1,9 @@
 TypeForwarders.cs
 AssemblyInfo.cs
 
+ClrThreadPoolBoundHandle.cs
+ClrThreadPoolBoundHandleOverlapped.cs
+ClrThreadPoolPreAllocatedOverlapped.cs
+DeferredDisposableLifetime.cs
+SR.cs
+HResults.cs
index 127e5a1f080eb04b66754124352a3903b53ece39..dd272df5d996c56f703f0c19bfc8ee24d818b964 100644 (file)
@@ -22,6 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.IOCompletionCallback))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.NativeOverlapped))]
-
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.PreAllocatedOverlapped))]
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadPoolBoundHandle))]
index 1b3e7a3a46b6e5b29adbd0c1754c3b9bb289b10a..a4915b94613f6cb8481ceae1097a4fe7dcfc7910 100644 (file)
@@ -47,4 +47,5 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.IXmlSerializable))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDateTimeSerializationMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSchemaProviderAttribute))]
 
index 45ffe3482e084120afd9a7685bf6684b584bee83..16a26f2c55db1e21bbb3c17affae841887e4c8d8 100644 (file)
@@ -11,7 +11,7 @@ LIBRARY = System.Xml.XPath.XDocument.dll
 
 KEY_FILE = ../../msfinal.pub
 SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System System.Xml.Linq
+LIB_REFS = System System.Xml System.Xml.Linq
 LIB_MCS_FLAGS = $(SIGN_FLAGS)
 
 PLATFORM_DEBUG_FLAGS =
index a9ce64258f895e97a52d9aedd6489aeab736a08b..0fec9f720b46d9d83d0367053fa01bb674a929ae 100644 (file)
@@ -22,4 +22,3 @@
 
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XPath.Extensions))]
 
-//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XPath.XDocumentExtensions))]
diff --git a/mcs/class/Facades/System.Xml.XPath.XDocument/XDocumentExtensions.cs b/mcs/class/Facades/System.Xml.XPath.XDocument/XDocumentExtensions.cs
new file mode 100644 (file)
index 0000000..d254f73
--- /dev/null
@@ -0,0 +1,29 @@
+
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Xml.Linq;
+
+namespace System.Xml.XPath
+{
+    public static class XDocumentExtensions
+    {
+        private class XDocumentNavigable : IXPathNavigable
+        {
+            private XNode _node;
+            public XDocumentNavigable(XNode n)
+            {
+                _node = n;
+            }
+            public XPathNavigator CreateNavigator()
+            {
+                return _node.CreateNavigator();
+            }
+        }
+        public static IXPathNavigable ToXPathNavigable(this XNode node)
+        {
+            return new XDocumentNavigable(node);
+        }
+    }
+}
\ No newline at end of file
index ebece6f697ae88735a674fd6ed89b10c8179167b..e7d21881798b1c07c522d2f2ae9694bc0cf7a303 100644 (file)
@@ -3,13 +3,13 @@
 # Caution while renaming SUBDIRS variables as those are used outside mono repository.
 # ie: macccore/builds/Makefile
 
-monotouch_PARALLEL_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel \
+common_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel \
 System.Diagnostics.Contracts System.Diagnostics.Debug System.Diagnostics.Tracing System.Diagnostics.Tools System.Dynamic.Runtime System.Globalization System.IO System.Linq.Expressions \
 System.Linq.Parallel System.Linq.Queryable System.Linq System.Net.NetworkInformation System.Net.Primitives System.Net.Requests System.ObjectModel \
 System.Reflection.Extensions System.Reflection.Primitives System.Reflection System.Resources.ResourceManager System.Runtime.Extensions \
 System.Runtime.InteropServices System.Runtime.InteropServices.WindowsRuntime System.Runtime.Numerics System.Runtime.Serialization.Json \
-System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml System.Runtime System.Security.Principal System.ServiceModel.Http \
-System.ServiceModel.Primitives System.ServiceModel.Security System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
+System.Runtime System.Security.Principal System.ServiceModel.Http \
+System.ServiceModel.Security System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
 System.Threading.Tasks System.Threading.Timer System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer \
 System.Runtime.Handles System.ServiceModel.Duplex System.ServiceModel.NetTcp \
 Microsoft.Win32.Primitives Microsoft.Win32.Registry System.AppContext System.Collections.NonGeneric System.Collections.Specialized System.ComponentModel.Primitives \
@@ -22,25 +22,45 @@ System.Net.Utilities System.Net.WebHeaderCollection System.Net.WebSockets System
 System.Security.AccessControl System.Security.Claims System.Security.Cryptography.DeriveBytes System.Security.Cryptography.Encoding System.Security.Cryptography.Encryption \
 System.Security.Cryptography.Encryption.Aes System.Security.Cryptography.Encryption.ECDiffieHellman System.Security.Cryptography.Encryption.ECDsa System.Security.Cryptography.Hashing \
 System.Security.Cryptography.Hashing.Algorithms System.Security.Cryptography.RSA System.Security.Cryptography.RandomNumberGenerator \
-System.Security.Cryptography.X509Certificates System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
+System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
 System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \
 System.IO.FileSystem.AccessControl System.Private.CoreLib.InteropServices System.Private.CoreLib.Threading System.Reflection.TypeExtensions \
 System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument System.IO.Compression \
-System.Security.Cryptography.Algorithms System.Security.Cryptography.Primitives
+System.Security.Cryptography.Algorithms System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
+System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
+
+# common_SUBDIRS dependencies
+common_DEPS_SUBDIRS = System.Security.Cryptography.X509Certificates System.ServiceModel.Primitives System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml \
+System.Drawing.Primitives
 
 reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
 
+monotouch_SUBDIRS = $(common_DEPS_SUBDIRS)
+monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
+
+mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
 mobile_static_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
 
-net_4_x_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
-System.IO.FileSystem.Watcher System.IO.Pipes System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.Net.Http.WebRequestHandler
+net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS)
+net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(reflection_PARALLEL_SUBDIRS) System.Diagnostics.PerformanceCounter \
+System.Net.Http.WebRequestHandler
 
+monodroid_SUBDIRS = $(monotouch_SUBDIRS)
 monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
 
-xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
-xammac_net_4_5_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
+xammac_SUBDIRS = $(monotouch_SUBDIRS)
+xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
+
+xammac_net_4_5_SUBDIRS = $(net_4_x_SUBDIRS)
+xammac_net_4_5_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
 
+monotouch_watch_SUBDIRS = $(monotouch_SUBDIRS)
 monotouch_watch_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
+
+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
+
 PROFILE_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
index efc8181c02ef7bb0f70307a5afa07703fb061c99..46db72b36c7747d14b54cbc7f6d3a695262c0b15 100644 (file)
@@ -23,6 +23,7 @@ mobile_common_dirs := \
        Mono.Security \
        System  \
        System.Core     \
+       System.Security \
        System.XML      \
        I18N            \
        System.ServiceModel.Internals   \
@@ -36,6 +37,7 @@ mobile_common_dirs := \
        Mono.Data.Tds   \
        System.Transactions     \
        System.Numerics \
+       System.Numerics.Vectors         \
        System.Data     \
        Mono.Cairo      \
        Mono.Data.Sqlite        \
@@ -54,7 +56,11 @@ mobile_common_dirs := \
        Mono.Security.Providers.DotNet  \
        Mono.Security.Providers.NewSystemSource \
        Mono.Security.Providers.NewTls  \
-       System.Runtime.InteropServices.RuntimeInformation
+       System.Runtime.InteropServices.RuntimeInformation       \
+       System.Reflection.DispatchProxy \
+       System.Xml.XPath.XmlDocument \
+       System.Reflection.Context       \
+       System.Net.Http.WinHttpHandler
 
 mobile_static_dirs := \
        $(mobile_common_dirs)   \
@@ -95,6 +101,7 @@ xammac_4_5_dirs := \
        System  \
        Mono.Posix                      \
        System.Core     \
+       System.Security                 \
        System.XML      \
        I18N            \
        System.ServiceModel.Internals   \
@@ -130,11 +137,14 @@ xammac_4_5_dirs := \
        Mono.CompilerServices.SymbolWriter      \
        System.Data.Linq                \
        System.Net.Http \
+       System.Net.Http.WebRequest \
        Mono.Security.Providers.DotNet \
        Mono.Security.Providers.OldTls \
        Mono.Security.Providers.NewSystemSource \
        Mono.Security.Providers.NewTls \
        System.Runtime.InteropServices.RuntimeInformation \
+       System.Reflection.Context       \
+       System.Net.Http.WinHttpHandler  \
        $(pcl_facade_dirs)
 
 net_4_x_dirs := \
@@ -278,6 +288,7 @@ net_4_x_parallel_dirs := \
        System.Workflow.Activities \
        System.Workflow.ComponentModel \
        System.Workflow.Runtime \
+       System.Reflection.Context \
        $(pcl_facade_dirs)
 
 xbuild_2_0_dirs := \
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs
new file mode 100644 (file)
index 0000000..873ce57
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// SafeNCryptHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public abstract class SafeNCryptHandle : System.Runtime.InteropServices.SafeHandle
+       {
+               protected SafeNCryptHandle ()
+                       : base (IntPtr.Zero, true)
+               {
+               }
+
+               public override bool IsInvalid { get { throw new NotImplementedException (); } }
+
+               protected override bool ReleaseHandle ()
+               {
+                       return false;
+               }
+
+               protected abstract bool ReleaseNativeHandle();
+       }
+}      
\ No newline at end of file
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs
new file mode 100644 (file)
index 0000000..3dcbfae
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// SafeNCryptKeyHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeNCryptKeyHandle : SafeNCryptHandle
+       {
+               public SafeNCryptKeyHandle ()
+               {
+               }
+
+               protected override bool ReleaseNativeHandle ()
+               {
+                       return false;
+               }
+       }
+}      
\ No newline at end of file
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs
new file mode 100644 (file)
index 0000000..4a2d17a
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// SafeNCryptProviderHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeNCryptProviderHandle : SafeNCryptHandle
+       {
+               public SafeNCryptProviderHandle ()
+               {
+               }
+
+               protected override bool ReleaseNativeHandle ()
+               {
+                       return false;
+               }
+       }
+}      
\ No newline at end of file
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs
new file mode 100644 (file)
index 0000000..8943e38
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// SafeNCryptSecretHandle.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Microsoft.Win32.SafeHandles
+{
+       public sealed class SafeNCryptSecretHandle : SafeNCryptHandle
+       {
+               public SafeNCryptSecretHandle ()
+               {
+               }
+
+               protected override bool ReleaseNativeHandle ()
+               {
+                       return false;
+               }
+       }
+}      
\ No newline at end of file
index 2c195034d83fa59f0a2b62a831db6e3f97ef668a..23bf26f7482bb7654e1e5043f8381c937000f460 100644 (file)
@@ -63,7 +63,7 @@ namespace System.IO.Pipes
                {
                }
 
-               public AnonymousPipeClientStream (PipeDirection direction,SafePipeHandle safePipeHandle)
+               public AnonymousPipeClientStream (PipeDirection direction, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
                {
                        /*
@@ -73,7 +73,11 @@ namespace System.IO.Pipes
                                impl = new UnixAnonymousPipeClient (this, safePipeHandle);
                        */
 
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        InitializeHandle (safePipeHandle, false, false);
+#endif
                        IsConnected = true;
                }
 
index 01e4b1dbf49308e502c5209126ce33cbed4e7fd9..97455f30cdab55d78766508ad566684a21674a3b 100644 (file)
@@ -59,10 +59,18 @@ namespace System.IO.Pipes
                }
 
                public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize)
+#if MOBILE
+                       : base (direction, bufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+#else
                        : this (direction, inheritability, bufferSize, null)
                {
                }
+#endif
 
+#if !MOBILE
                public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
                        : base (direction, bufferSize)
                {
@@ -77,6 +85,7 @@ namespace System.IO.Pipes
                        InitializeHandle (impl.Handle, false, false);
                        IsConnected = true;
                }
+#endif
 
                [MonoTODO]
                public AnonymousPipeServerStream (PipeDirection direction, SafePipeHandle serverSafePipeHandle, SafePipeHandle clientSafePipeHandle)
@@ -90,6 +99,9 @@ namespace System.IO.Pipes
                        if (direction == PipeDirection.InOut)
                                throw new NotSupportedException ("Anonymous pipe direction can only be either in or out.");
 
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32AnonymousPipeServer (this, serverSafePipeHandle, clientSafePipeHandle);
                        else
@@ -99,6 +111,12 @@ namespace System.IO.Pipes
                        IsConnected = true;
 
                        ClientSafePipeHandle = clientSafePipeHandle;
+#endif
+               }
+
+               ~AnonymousPipeServerStream ()
+               {
+                       // To be compatible with .net
                }
 
                IAnonymousPipeServer impl;
index 357f7387d23681febef3fbd4bf1bc440688d6c43..181ab1ccbf0b44cd4f14ca719e5f49d71f498647 100644 (file)
@@ -72,21 +72,33 @@ namespace System.IO.Pipes
                }
 
                public NamedPipeClientStream (string serverName, string pipeName, PipeDirection direction, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
+#if MOBILE
+                       : base (direction, DefaultBufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+#else
                        : this (serverName, pipeName, ToAccessRights (direction), options, impersonationLevel, inheritability)
                {
                }
+#endif
 
                public NamedPipeClientStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32NamedPipeClient (this, safePipeHandle);
                        else
                                impl = new UnixNamedPipeClient (this, safePipeHandle);
                        IsConnected = isConnected;
                        InitializeHandle (safePipeHandle, true, isAsync);
+#endif
                }
 
+#if !MOBILE
                public NamedPipeClientStream (string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
                        : base (ToDirection (desiredAccessRights), DefaultBufferSize)
                {
@@ -99,21 +111,30 @@ namespace System.IO.Pipes
                        else
                                impl = new UnixNamedPipeClient (this, serverName, pipeName, desiredAccessRights, options, inheritability);
                }
+#endif
 
                INamedPipeClient impl;
 
                public void Connect ()
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        impl.Connect ();
                        InitializeHandle (impl.Handle, false, impl.IsAsync);
                        IsConnected = true;
+#endif
                }
 
                public void Connect (int timeout)
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else                  
                        impl.Connect (timeout);
                        InitializeHandle (impl.Handle, false, impl.IsAsync);
                        IsConnected = true;
+#endif
                }
 
                public int NumberOfServerInstances {
index b29deaf3301489decd3473fe85db39af83ecfbf6..2723109bd988f7e2ec1a34558cb600b810a77027 100644 (file)
@@ -70,10 +70,18 @@ namespace System.IO.Pipes
                }
 
                public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize)
+#if MOBILE             
+                       : base (direction, inBufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+#else
                        : this (pipeName, direction, maxNumberOfServerInstances, transmissionMode, options, inBufferSize, outBufferSize, null)
                {
                }
+#endif
 
+#if !MOBILE
                public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity)
                        : this (pipeName, direction, maxNumberOfServerInstances, transmissionMode, options, inBufferSize, outBufferSize, pipeSecurity, HandleInheritability.None)
                {
@@ -101,16 +109,26 @@ namespace System.IO.Pipes
 
                        InitializeHandle (impl.Handle, false, (options & PipeOptions.Asynchronous) != PipeOptions.None);
                }
+#endif
 
                public NamedPipeServerStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
                        : base (direction, DefaultBufferSize)
                {
+#if MOBILE
+                       throw new NotImplementedException ();
+#else
                        if (IsWindows)
                                impl = new Win32NamedPipeServer (this, safePipeHandle);
                        else
                                impl = new UnixNamedPipeServer (this, safePipeHandle);
                        IsConnected = isConnected;
                        InitializeHandle (safePipeHandle, true, isAsync);
+#endif
+               }
+
+               ~NamedPipeServerStream ()
+               {
+                       // To be compatible with .net
                }
 
                INamedPipeServer impl;
@@ -120,12 +138,14 @@ namespace System.IO.Pipes
                        impl.Disconnect ();
                }
 
+#if !MOBILE
                [MonoTODO]
                [SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPrincipal)]
                public void RunAsClient (PipeStreamImpersonationWorker impersonationWorker)
                {
                        throw new NotImplementedException ();
                }
+#endif
 
                public void WaitForConnection ()
                {
@@ -140,6 +160,7 @@ namespace System.IO.Pipes
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE
                // async operations
 
                Action wait_connect_delegate;
@@ -156,6 +177,7 @@ namespace System.IO.Pipes
                {
                        wait_connect_delegate.EndInvoke (asyncResult);
                }
+#endif
        }
 }
 
index fd4a57a693063f4b21c28f755bd953d42089206b..ed030e7608bde8da0cf99b23f88752f042804491 100644 (file)
@@ -46,15 +46,18 @@ namespace System.IO.Pipes
                // FIXME: not precise.
                internal const int DefaultBufferSize = 0x400;
 
+#if !MOBILE
                internal static bool IsWindows {
                        get { return Win32Marshal.IsWindows; }
                }
+#endif
 
                internal Exception ThrowACLException ()
                {
                        return new NotImplementedException ("ACL is not supported in Mono");
                }
 
+#if !MOBILE
                internal static PipeAccessRights ToAccessRights (PipeDirection direction)
                {
                        switch (direction) {
@@ -85,6 +88,7 @@ namespace System.IO.Pipes
                                        throw new ArgumentOutOfRangeException ();
                        }
                }
+#endif
 
                protected PipeStream (PipeDirection direction, int bufferSize)
                        : this (direction, PipeTransmissionMode.Byte, bufferSize)
@@ -140,7 +144,9 @@ namespace System.IO.Pipes
                        set { stream = value; }
                }
 
+#if !MOBILE
                protected bool IsHandleExposed { get; private set; }
+#endif
 
                [MonoTODO]
                public bool IsMessageComplete { get; private set; }
@@ -176,7 +182,19 @@ namespace System.IO.Pipes
                }
 
                // initialize/dispose/state check
+#if MOBILE
+               internal static void CheckPipePropertyOperations ()
+               {
+               }
 
+               static void CheckReadOperations ()
+               {
+               }
+
+               static void CheckWriteOperations ()
+               {
+               }
+#else
                [MonoTODO]
                protected internal virtual void CheckPipePropertyOperations ()
                {
@@ -206,6 +224,7 @@ namespace System.IO.Pipes
                        this.IsHandleExposed = isExposed;
                        this.IsAsync = isAsync;
                }
+#endif
 
                protected override void Dispose (bool disposing)
                {
@@ -234,6 +253,7 @@ namespace System.IO.Pipes
                        throw new NotSupportedException ();
                }
 
+#if !MOBILE
                public PipeSecurity GetAccessControl ()
                {
                        return new PipeSecurity (SafePipeHandle,
@@ -255,6 +275,7 @@ namespace System.IO.Pipes
                public void WaitForPipeDrain ()
                {
                }
+#endif
 
                [MonoTODO]
                public override int Read ([In] byte [] buffer, int offset, int count)
@@ -298,6 +319,7 @@ namespace System.IO.Pipes
 
                // async
 
+#if !MOBILE
                Func<byte [],int,int,int> read_delegate;
 
                [HostProtection (SecurityAction.LinkDemand, ExternalThreading = true)]
@@ -327,6 +349,7 @@ namespace System.IO.Pipes
                {
                        write_delegate.EndInvoke (asyncResult);
                }
+#endif
        }
 }
 
diff --git a/mcs/class/System.Core/System.Security.Cryptography/AesCng.cs b/mcs/class/System.Core/System.Security.Cryptography/AesCng.cs
new file mode 100644 (file)
index 0000000..64377b7
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// AesCng.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class AesCng : Aes
+       {
+               public AesCng ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public AesCng (string keyName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public AesCng (string keyName, CngProvider provider)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public AesCng (string keyName, CngProvider provider, CngKeyOpenOptions openOptions)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override Byte[] Key {
+                       get {
+                               throw new NotImplementedException ();
+                       } set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override int KeySize {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override ICryptoTransform CreateDecryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateDecryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       return default(System.Security.Cryptography.ICryptoTransform);
+               }
+
+               protected override void Dispose (bool disposing) {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateIV ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateKey ()
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Core/System.Security.Cryptography/TripleDESCng.cs b/mcs/class/System.Core/System.Security.Cryptography/TripleDESCng.cs
new file mode 100644 (file)
index 0000000..48f9377
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// TripleDESCng.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Security.Cryptography
+{
+       public sealed class TripleDESCng : TripleDES
+       {
+               public TripleDESCng ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public TripleDESCng (string keyName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public TripleDESCng (string keyName, CngProvider provider)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public TripleDESCng (string keyName, CngProvider provider, CngKeyOpenOptions openOptions)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override Byte[] Key {
+                       get {
+                               throw new NotImplementedException ();
+                       } set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override int KeySize {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+               public override ICryptoTransform CreateDecryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateDecryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override ICryptoTransform CreateEncryptor (Byte[] rgbKey, Byte[] rgbIV)
+               {
+                       return default(System.Security.Cryptography.ICryptoTransform);
+               }
+
+               protected override void Dispose (bool disposing) {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateIV ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void GenerateKey ()
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
\ No newline at end of file
index 8457ac0ffa956b8adefff43c8dee3750d89d2799..4489cceea185442afc7b62e8476f80ee2436ab13 100644 (file)
@@ -6,8 +6,25 @@ System.IO.MemoryMappedFiles/MemoryMappedFile.cs
 System.IO.MemoryMappedFiles/MemoryMappedView.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
+System.Security.Cryptography/AesCng.cs
+System.Security.Cryptography/TripleDESCng.cs
 System.Security.Cryptography.X509Certificates/ECDsaCertificateExtensions.cs
 System.Security.Cryptography.X509Certificates/RSACertificateExtensions.cs
+Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs
+Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs
+Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.cs
+Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.cs
+Microsoft.Win32.SafeHandles/SafePipeHandle.cs
+
+System.IO.Pipes/AnonymousPipeClientStream.cs
+System.IO.Pipes/AnonymousPipeServerStream.cs
+System.IO.Pipes/NamedPipeClientStream.cs
+System.IO.Pipes/NamedPipeServerStream.cs
+System.IO.Pipes/PipeDirection.cs
+System.IO.Pipes/PipeInterfaces.cs
+System.IO.Pipes/PipeOptions.cs
+System.IO.Pipes/PipeStream.cs
+System.IO.Pipes/PipeTransmissionMode.cs
 
 ReferenceSources/SR.cs
 ReferenceSources/SR.missing.cs
@@ -187,9 +204,20 @@ ReferenceSources/Strings.cs
 ../referencesource/System.Core/System/Runtime/CompilerServices/ExecutionScope.cs
 
 ../referencesource/System.Core/System/Security/Cryptography/Aes.cs
+../referencesource/System.Core/System/Security/Cryptography/BCryptNative.cs
+../referencesource/System.Core/System/Security/Cryptography/CngAlgorithm.cs
+../referencesource/System.Core/System/Security/Cryptography/CngAlgorithmGroup.cs
+../referencesource/System.Core/System/Security/Cryptography/CngKey.cs
 ../referencesource/System.Core/System/Security/Cryptography/CngKeyBlobFormat.cs
+../referencesource/System.Core/System/Security/Cryptography/CngKeyCreationParameters.cs
+../referencesource/System.Core/System/Security/Cryptography/CngProperty.cs
+../referencesource/System.Core/System/Security/Cryptography/CngProvider.cs
+../referencesource/System.Core/System/Security/Cryptography/CngUIPolicy.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellmanPublicKey.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDsa.cs
+../referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
+../referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs
+../referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
 
 ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
 
index 0d79ec4913e03f5878ac587c69a5a5324589d5a6..8b8fef0e40e738565956982bb7c19e8fb8c0f9ee 100644 (file)
@@ -3,8 +3,6 @@
 
 System.Security.Cryptography/AesCryptoServiceProvider.cs
 System.Security.Cryptography/AesTransform.cs
-System.Security.Cryptography/CngAlgorithm.cs
-System.Security.Cryptography/CngAlgorithmGroup.cs
 System.Security.Cryptography/MD5Cng.cs
 System.Security.Cryptography/SHA1Cng.cs
 System.Security.Cryptography/SHA256Cng.cs
index 5dedcbf316cf764099726b96424a0bdbabcad725..f367efd60c7562e4d1253707eed5828ace4a90e5 100644 (file)
@@ -1,29 +1,16 @@
 #include common_System.Core.dll.sources
 #include dynamic_System.Core.dll.sources
 
-Microsoft.Win32.SafeHandles/SafePipeHandle.cs
-
-System.IO.Pipes/AnonymousPipeClientStream.cs
-System.IO.Pipes/AnonymousPipeServerStream.cs
-System.IO.Pipes/NamedPipeClientStream.cs
-System.IO.Pipes/NamedPipeServerStream.cs
 System.IO.Pipes/PipeAccessRights.cs
 System.IO.Pipes/PipeAccessRule.cs
 System.IO.Pipes/PipeAuditRule.cs
-System.IO.Pipes/PipeDirection.cs
-System.IO.Pipes/PipeInterfaces.cs
-System.IO.Pipes/PipeOptions.cs
 System.IO.Pipes/PipeSecurity.cs
-System.IO.Pipes/PipeStream.cs
 System.IO.Pipes/PipeStreamImpersonationWorker.cs
-System.IO.Pipes/PipeTransmissionMode.cs
 System.IO.Pipes/PipeUnix.cs
 System.IO.Pipes/PipeWin32.cs
 
 System.Security.Cryptography/AesCryptoServiceProvider.cs
 System.Security.Cryptography/AesTransform.cs
-System.Security.Cryptography/CngAlgorithm.cs
-System.Security.Cryptography/CngAlgorithmGroup.cs
 System.Security.Cryptography/MD5Cng.cs
 System.Security.Cryptography/SHA1Cng.cs
 System.Security.Cryptography/SHA256Cng.cs
index b928fc4086aa72b6ef1c26353187c972223afad2..04a93d20c2dfb28f6caf3366b63edf152ecf6de8 100644 (file)
@@ -35,87 +35,87 @@ namespace Microsoft.SqlServer.Server
 {
        public sealed class SqlDataRecord : IDataRecord
        {
-               public bool GetBoolean (int i)
+               public bool GetBoolean (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public byte GetByte (int i)
+               public byte GetByte (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public long GetBytes (int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
+               public long GetBytes (int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length)
                {
                        throw new NotImplementedException ();
                }
 
-               public char GetChar (int i)
+               public char GetChar (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public long GetChars (int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
+               public long GetChars (int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length)
                {
                        throw new NotImplementedException ();
                }
 
-               public IDataReader GetData (int i)
+               public IDataReader GetData (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public string GetDataTypeName (int i)
+               public string GetDataTypeName (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public DateTime GetDateTime (int i)
+               public DateTime GetDateTime (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public decimal GetDecimal (int i)
+               public decimal GetDecimal (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public double GetDouble (int i)
+               public double GetDouble (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public System.Type GetFieldType (int i)
+               public System.Type GetFieldType (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public float GetFloat (int i)
+               public float GetFloat (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public Guid GetGuid (int i)
+               public Guid GetGuid (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public short GetInt16 (int i)
+               public short GetInt16 (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public int GetInt32 (int i)
+               public int GetInt32 (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public long GetInt64 (int i)
+               public long GetInt64 (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public string GetName (int i)
+               public string GetName (int ordinal)
                {
                        throw new NotImplementedException ();
                }
@@ -125,12 +125,12 @@ namespace Microsoft.SqlServer.Server
                        throw new NotImplementedException ();
                }
 
-               public string GetString (int i)
+               public string GetString (int ordinal)
                {
                        throw new NotImplementedException ();
                }
 
-               public object GetValue (int i)
+               public object GetValue (int ordinal)
                {
                        throw new NotImplementedException ();
                }
@@ -140,7 +140,7 @@ namespace Microsoft.SqlServer.Server
                        throw new NotImplementedException ();
                }
 
-               public bool IsDBNull (int i)
+               public bool IsDBNull (int ordinal)
                {
                        throw new NotImplementedException ();
                }
@@ -151,13 +151,13 @@ namespace Microsoft.SqlServer.Server
                        }
                }
 
-               public object this [string index] {
+               public object this [string name] {
                        get {
                                throw new NotImplementedException ();
                        }
                }
 
-               public object this [int index] {
+               public object this [int ordinal] {
                        get {
                                throw new NotImplementedException ();
                        }
index 59ff776b9f1ccbf1bb35ea36e60206a59417782f..e815bbf4afb76ab33d200014641888020c38484d 100644 (file)
@@ -5,7 +5,7 @@ SUBDIRS =
 LIBRARY = System.Drawing.dll
 
 LIB_REFS = System
-LIB_MCS_FLAGS = /unsafe \
+LIB_MCS_FLAGS = /unsafe -d:FEATURE_TYPECONVERTER \
        -resource:Assembly/Mono.ico,Mono.ico -resource:Assembly/Information.ico,Information.ico \
        -resource:Assembly/Error.ico,Error.ico -resource:Assembly/Warning.ico,Warning.ico \
        -resource:Assembly/Question.ico,Question.ico -resource:Assembly/Shield.ico,Shield.ico
index 88a8390b564906d2f34fc3785f8393481fd9dbc0..53f9568067a9c89753e9819535766698858c3661 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Drawing
 {
        [Serializable]  
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (PointConverter))]
 #endif
        public struct Point
index c2ffbc80e5e647b589ed5aec55c96c1fb0703439..0d1194675b223e54710ff551d3e8644ec9471b95 100644 (file)
@@ -39,7 +39,7 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (RectangleConverter))]
 #endif
        public struct Rectangle
index be8fda0ea8ef0b73bf815febb8e8d4e025eab3aa..3c657dc29f26a1836d132f075f63cf4d004f1949 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (SizeConverter))]
 #endif
        public struct Size
index 38714d1c9968f30ae18e363a4c811a82dc38de99..922ab4e35e29dc35378e9a66c8d78e019962f23a 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Drawing
 {
        [Serializable]
        [ComVisible (true)]
-#if !MONOTOUCH && !MONOMAC
+#if !MONOTOUCH && !MONOMAC && FEATURE_TYPECONVERTER
        [TypeConverter (typeof (SizeFConverter))]
 #endif
        public struct SizeF
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/Assembly/AssemblyInfo.cs b/mcs/class/System.Net.Http.WinHttpHandler/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..d477aee
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Net.Http.WinHttpHandler.dll")]
+[assembly: AssemblyDescription ("System.Net.Http.WinHttpHandler.dll")]
+[assembly: AssemblyDefaultAlias ("System.Net.Http.WinHttpHandler.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/Makefile b/mcs/class/System.Net.Http.WinHttpHandler/Makefile
new file mode 100644 (file)
index 0000000..55b07ff
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Net.Http.WinHttpHandler
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Net.Http.WinHttpHandler.dll
+LIB_REFS = System System.Net.Http
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.dll.sources b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.dll.sources
new file mode 100644 (file)
index 0000000..97feb39
--- /dev/null
@@ -0,0 +1,8 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+
+System.Net.Http/CookieUsePolicy.cs
+System.Net.Http/WindowsProxyUsePolicy.cs
+System.Net.Http/WinHttpHandler.cs
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/CookieUsePolicy.cs b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/CookieUsePolicy.cs
new file mode 100644 (file)
index 0000000..f27cb2c
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// CookieUsePolicy.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+namespace System.Net.Http
+{
+       public enum CookieUsePolicy
+       {
+               IgnoreCookies = 0,
+               UseInternalCookieStoreOnly = 1,
+               UseSpecifiedCookieContainer = 2,
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WinHttpHandler.cs b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WinHttpHandler.cs
new file mode 100644 (file)
index 0000000..e2db5f6
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// WinHttpHandler.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Net.Security;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net.Http
+{
+       public class WinHttpHandler : HttpMessageHandler
+       {
+               public WinHttpHandler() { throw new PlatformNotSupportedException (); }
+
+               public DecompressionMethods AutomaticDecompression { get { throw new PlatformNotSupportedException ();  } set { throw new PlatformNotSupportedException (); } }
+
+               public bool AutomaticRedirection { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public bool CheckCertificateRevocationList { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public ClientCertificateOption ClientCertificateOption { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public X509Certificate2Collection ClientCertificates { get { throw new PlatformNotSupportedException (); } }
+
+               public CookieContainer CookieContainer { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public CookieUsePolicy CookieUsePolicy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public ICredentials DefaultProxyCredentials { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxAutomaticRedirections { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxConnectionsPerServer { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxResponseDrainSize { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public int MaxResponseHeadersLength { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public bool PreAuthenticate { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public IDictionary<string, object> Properties { get { throw new PlatformNotSupportedException (); } }
+
+               public IWebProxy Proxy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public TimeSpan ReceiveDataTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public TimeSpan ReceiveHeadersTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public TimeSpan SendTimeout { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateValidationCallback { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public ICredentials ServerCredentials { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public SslProtocols SslProtocols { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               public WindowsProxyUsePolicy WindowsProxyUsePolicy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
+
+               protected override void Dispose (bool disposing) { throw new PlatformNotSupportedException (); }
+
+               protected override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, Threading.CancellationToken cancellationToken) { throw new PlatformNotSupportedException (); }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WindowsProxyUsePolicy.cs b/mcs/class/System.Net.Http.WinHttpHandler/System.Net.Http/WindowsProxyUsePolicy.cs
new file mode 100644 (file)
index 0000000..48de6bb
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// WindowsProxyUsePolicy.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+namespace System.Net.Http
+{
+       public enum WindowsProxyUsePolicy
+       {
+               DoNotUseProxy = 0,
+               UseCustomProxy = 3,
+               UseWinHttpProxy = 1,
+               UseWinInetProxy = 2,
+       }
+}
\ No newline at end of file
index 47fa0620e9781bcdfb6b5139cc957c3624941fc0..42fb194dbfb9e8b675f08bbeb0b63bfb9ce1d3d0 100644 (file)
@@ -4,7 +4,7 @@ include ../../build/rules.make
 
 LIBRARY = System.Numerics.Vectors.dll
 LIB_REFS = System System.Numerics
-LIB_MCS_FLAGS =
+LIB_MCS_FLAGS = -unsafe
 
 EXTRA_DISTFILES =
 
diff --git a/mcs/class/System.Numerics.Vectors/SR.cs b/mcs/class/System.Numerics.Vectors/SR.cs
new file mode 100644 (file)
index 0000000..72e9cfb
--- /dev/null
@@ -0,0 +1,17 @@
+// generated from Strings.resx in corefx
+
+partial class SR
+{
+       public const string Arg_ArgumentOutOfRangeException="Index was out of bounds:";
+       public const string Arg_ElementsInSourceIsGreaterThanDestination="Number of elements in source vector is greater than the destination array";
+       public const string Arg_MultiDimArrayNotSupported="Only one-dimensional arrays are supported";
+       public const string Arg_NullArgumentNullRef="The method was called with a null array argument.";
+       public const string Arg_RegisterLengthOfRangeException="length must be less than";
+       public const string Arg_TypeNotSupported="Specified type is not supported";
+       public const string Reflection_MethodNotSupported="Vector<T>.Count cannot be called via reflection when intrinsics are enabled.";
+
+       public static string Format (string message, object data)
+       {
+               return string.Format (message, data);
+       }
+}
index 0a2dca5005f52a60fe219ea5ba175fc2c123e743..01bdfc1724e2fd772bf1fd4b25f18ede8bbe7375 100644 (file)
@@ -2,3 +2,10 @@
 ../../build/common/SR.cs
 Assembly/AssemblyInfo.cs
 Assembly/TypeForwarders.cs
+SR.cs
+System.Numerics/ConstantHelper.cs
+System.Numerics/HashCodeHelper.cs
+System.Numerics/JitIntrinsicAttribute.cs
+System.Numerics/Register.cs
+System.Numerics/Vector_Operations.cs
+System.Numerics/Vector.cs
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/ConstantHelper.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/ConstantHelper.cs
new file mode 100644 (file)
index 0000000..ea32ed3
--- /dev/null
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.CompilerServices;
+
+namespace System.Numerics
+{
+    internal class ConstantHelper
+    {
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Byte GetByteWithAllBitsSet()
+        {
+            Byte value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Byte*)&value) = (Byte)0xff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static SByte GetSByteWithAllBitsSet()
+        {
+            SByte value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((SByte*)&value) = (SByte)0xff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static UInt16 GetUInt16WithAllBitsSet()
+        {
+            UInt16 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((UInt16*)&value) = (UInt16)0xffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Int16 GetInt16WithAllBitsSet()
+        {
+            Int16 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int16*)&value) = (Int16)0xffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static UInt32 GetUInt32WithAllBitsSet()
+        {
+            UInt32 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((UInt32*)&value) = (UInt32)0xffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Int32 GetInt32WithAllBitsSet()
+        {
+            Int32 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int32*)&value) = (Int32)0xffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static UInt64 GetUInt64WithAllBitsSet()
+        {
+            UInt64 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((UInt64*)&value) = (UInt64)0xffffffffffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Int64 GetInt64WithAllBitsSet()
+        {
+            Int64 value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int64*)&value) = (Int64)0xffffffffffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Single GetSingleWithAllBitsSet()
+        {
+            Single value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int32*)&value) = (Int32)0xffffffff;
+                }
+            }
+            return value;
+        }
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Double GetDoubleWithAllBitsSet()
+        {
+            Double value = 0;
+            unsafe
+            {
+                unchecked
+                {
+                    *((Int64*)&value) = (Int64)0xffffffffffffffff;
+                }
+            }
+            return value;
+        }
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/HashCodeHelper.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/HashCodeHelper.cs
new file mode 100644 (file)
index 0000000..1467e2f
--- /dev/null
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Numerics
+{
+    internal static class HashCodeHelper
+    {
+        /// <summary>
+        /// Combines two hash codes, useful for combining hash codes of individual vector elements
+        /// </summary>
+        internal static int CombineHashCodes(int h1, int h2)
+        {
+            return (((h1 << 5) + h1) ^ h2);
+        }
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/JitIntrinsicAttribute.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/JitIntrinsicAttribute.cs
new file mode 100644 (file)
index 0000000..7410412
--- /dev/null
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Numerics
+{
+    /// <summary>
+    /// An attribute that can be attached to JIT Intrinsic methods/properties
+    /// </summary>
+    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property)]
+    internal class JitIntrinsicAttribute : Attribute
+    {
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs
new file mode 100644 (file)
index 0000000..a27e922
--- /dev/null
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.InteropServices;
+
+namespace System.Numerics
+{
+    /// <summary>
+    /// A structure describing the layout of an SSE2-sized register.
+    /// Contains overlapping fields representing the set of valid numeric types.
+    /// Allows the generic Vector'T struct to contain an explicit field layout.
+    /// </summary>
+    [StructLayout(LayoutKind.Explicit)]
+    internal struct Register
+    {
+        #region Internal Storage Fields
+        // Internal System.Byte Fields
+        [FieldOffset(0)]
+        internal Byte byte_0;
+        [FieldOffset(1)]
+        internal Byte byte_1;
+        [FieldOffset(2)]
+        internal Byte byte_2;
+        [FieldOffset(3)]
+        internal Byte byte_3;
+        [FieldOffset(4)]
+        internal Byte byte_4;
+        [FieldOffset(5)]
+        internal Byte byte_5;
+        [FieldOffset(6)]
+        internal Byte byte_6;
+        [FieldOffset(7)]
+        internal Byte byte_7;
+        [FieldOffset(8)]
+        internal Byte byte_8;
+        [FieldOffset(9)]
+        internal Byte byte_9;
+        [FieldOffset(10)]
+        internal Byte byte_10;
+        [FieldOffset(11)]
+        internal Byte byte_11;
+        [FieldOffset(12)]
+        internal Byte byte_12;
+        [FieldOffset(13)]
+        internal Byte byte_13;
+        [FieldOffset(14)]
+        internal Byte byte_14;
+        [FieldOffset(15)]
+        internal Byte byte_15;
+
+        // Internal System.SByte Fields
+        [FieldOffset(0)]
+        internal SByte sbyte_0;
+        [FieldOffset(1)]
+        internal SByte sbyte_1;
+        [FieldOffset(2)]
+        internal SByte sbyte_2;
+        [FieldOffset(3)]
+        internal SByte sbyte_3;
+        [FieldOffset(4)]
+        internal SByte sbyte_4;
+        [FieldOffset(5)]
+        internal SByte sbyte_5;
+        [FieldOffset(6)]
+        internal SByte sbyte_6;
+        [FieldOffset(7)]
+        internal SByte sbyte_7;
+        [FieldOffset(8)]
+        internal SByte sbyte_8;
+        [FieldOffset(9)]
+        internal SByte sbyte_9;
+        [FieldOffset(10)]
+        internal SByte sbyte_10;
+        [FieldOffset(11)]
+        internal SByte sbyte_11;
+        [FieldOffset(12)]
+        internal SByte sbyte_12;
+        [FieldOffset(13)]
+        internal SByte sbyte_13;
+        [FieldOffset(14)]
+        internal SByte sbyte_14;
+        [FieldOffset(15)]
+        internal SByte sbyte_15;
+
+        // Internal System.UInt16 Fields
+        [FieldOffset(0)]
+        internal UInt16 uint16_0;
+        [FieldOffset(2)]
+        internal UInt16 uint16_1;
+        [FieldOffset(4)]
+        internal UInt16 uint16_2;
+        [FieldOffset(6)]
+        internal UInt16 uint16_3;
+        [FieldOffset(8)]
+        internal UInt16 uint16_4;
+        [FieldOffset(10)]
+        internal UInt16 uint16_5;
+        [FieldOffset(12)]
+        internal UInt16 uint16_6;
+        [FieldOffset(14)]
+        internal UInt16 uint16_7;
+
+        // Internal System.Int16 Fields
+        [FieldOffset(0)]
+        internal Int16 int16_0;
+        [FieldOffset(2)]
+        internal Int16 int16_1;
+        [FieldOffset(4)]
+        internal Int16 int16_2;
+        [FieldOffset(6)]
+        internal Int16 int16_3;
+        [FieldOffset(8)]
+        internal Int16 int16_4;
+        [FieldOffset(10)]
+        internal Int16 int16_5;
+        [FieldOffset(12)]
+        internal Int16 int16_6;
+        [FieldOffset(14)]
+        internal Int16 int16_7;
+
+        // Internal System.UInt32 Fields
+        [FieldOffset(0)]
+        internal UInt32 uint32_0;
+        [FieldOffset(4)]
+        internal UInt32 uint32_1;
+        [FieldOffset(8)]
+        internal UInt32 uint32_2;
+        [FieldOffset(12)]
+        internal UInt32 uint32_3;
+
+        // Internal System.Int32 Fields
+        [FieldOffset(0)]
+        internal Int32 int32_0;
+        [FieldOffset(4)]
+        internal Int32 int32_1;
+        [FieldOffset(8)]
+        internal Int32 int32_2;
+        [FieldOffset(12)]
+        internal Int32 int32_3;
+
+        // Internal System.UInt64 Fields
+        [FieldOffset(0)]
+        internal UInt64 uint64_0;
+        [FieldOffset(8)]
+        internal UInt64 uint64_1;
+
+        // Internal System.Int64 Fields
+        [FieldOffset(0)]
+        internal Int64 int64_0;
+        [FieldOffset(8)]
+        internal Int64 int64_1;
+
+        // Internal System.Single Fields
+        [FieldOffset(0)]
+        internal Single single_0;
+        [FieldOffset(4)]
+        internal Single single_1;
+        [FieldOffset(8)]
+        internal Single single_2;
+        [FieldOffset(12)]
+        internal Single single_3;
+
+        // Internal System.Double Fields
+        [FieldOffset(0)]
+        internal Double double_0;
+        [FieldOffset(8)]
+        internal Double double_1;
+
+        #endregion Internal Storage Fields
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/Vector.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/Vector.cs
new file mode 100644 (file)
index 0000000..13785ed
--- /dev/null
@@ -0,0 +1,5002 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Diagnostics.Contracts;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace System.Numerics
+{
+    /* Note: The following patterns are used throughout the code here and are described here
+    *
+    * PATTERN:
+    *    if (typeof(T) == typeof(Int32)) { ... }
+    *    else if (typeof(T) == typeof(Single)) { ... }
+    * EXPLANATION:
+    *    At runtime, each instantiation of Vector<T> will be type-specific, and each of these typeof blocks will be eliminated,
+    *    as typeof(T) is a (JIT) compile-time constant for each instantiation. This design was chosen to eliminate any overhead from
+    *    delegates and other patterns.
+    *
+    * PATTERN:
+    *    if (Vector.IsHardwareAccelerated) { ... }
+    *    else { ... }
+    * EXPLANATION
+    *    This pattern solves two problems:
+    *        1. Allows us to unroll loops when we know the size (when no hardware acceleration is present)
+    *        2. Allows reflection to work:
+    *            - If a method is called via reflection, it will not be "intrinsified", which would cause issues if we did
+    *              not provide an implementation for that case (i.e. if it only included a case which assumed 16-byte registers)
+    *    (NOTE: It is assumed that Vector.IsHardwareAccelerated will be a compile-time constant, eliminating these checks
+    *        from the JIT'd code.)
+    *
+    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+    /// <summary>
+    /// A structure that represents a single Vector. The count of this Vector is fixed but CPU register dependent.
+    /// This struct only supports numerical types. This type is intended to be used as a building block for vectorizing
+    /// large algorithms. This type is immutable, individual elements cannot be modified.
+    /// </summary>
+    public struct Vector<T> : IEquatable<Vector<T>>, IFormattable where T : struct
+    {
+        #region Fields
+        private Register register;
+        #endregion Fields
+
+        #region Static Members
+        /// <summary>
+        /// Returns the number of elements stored in the vector. This value is hardware dependent.
+        /// </summary>
+        [JitIntrinsic]
+        public static int Count
+        {
+            get
+            {
+                return s_count;
+            }
+        }
+        private static readonly int s_count = InitializeCount();
+
+        /// <summary>
+        /// Returns a vector containing all zeroes.
+        /// </summary>
+        [JitIntrinsic]
+        public static Vector<T> Zero { get { return zero; } }
+        private static readonly Vector<T> zero = new Vector<T>(GetZeroValue());
+
+        /// <summary>
+        /// Returns a vector containing all ones.
+        /// </summary>
+        [JitIntrinsic]
+        public static Vector<T> One { get { return one; } }
+        private static readonly Vector<T> one = new Vector<T>(GetOneValue());
+
+        internal static Vector<T> AllOnes { get { return allOnes; } }
+        private static readonly Vector<T> allOnes = new Vector<T>(GetAllBitsSetValue());
+        #endregion Static Members
+
+        #region Static Initialization
+        private struct VectorSizeHelper
+        {
+            internal Vector<T> _placeholder;
+            internal byte _byte;
+        }
+
+               // Calculates the size of this struct in bytes, by computing the offset of a field in a structure
+        private static unsafe int InitializeCount()
+        {
+            VectorSizeHelper vsh;
+            byte* vectorBase = &vsh._placeholder.register.byte_0;
+            byte* byteBase = &vsh._byte;
+            int vectorSizeInBytes = (int)(byteBase - vectorBase);
+
+            int typeSizeInBytes = -1;
+            if (typeof(T) == typeof(Byte))
+            {
+                typeSizeInBytes = sizeof(Byte);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                typeSizeInBytes = sizeof(SByte);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                typeSizeInBytes = sizeof(UInt16);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                typeSizeInBytes = sizeof(Int16);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                typeSizeInBytes = sizeof(UInt32);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                typeSizeInBytes = sizeof(Int32);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                typeSizeInBytes = sizeof(UInt64);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                typeSizeInBytes = sizeof(Int64);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                typeSizeInBytes = sizeof(Single);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                typeSizeInBytes = sizeof(Double);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+
+            return vectorSizeInBytes / typeSizeInBytes;
+        }
+        #endregion Static Initialization
+
+        #region Constructors
+        /// <summary>
+        /// Constructs a vector whose components are all <code>value</code>
+        /// </summary>
+        [JitIntrinsic]
+        public unsafe Vector(T value)
+            : this()
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Byte)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (SByte)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt16)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int16)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt32)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int32)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt64)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int64)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Single)(object)value;
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Double)(object)value;
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = (Byte)(object)value;
+                    register.byte_1 = (Byte)(object)value;
+                    register.byte_2 = (Byte)(object)value;
+                    register.byte_3 = (Byte)(object)value;
+                    register.byte_4 = (Byte)(object)value;
+                    register.byte_5 = (Byte)(object)value;
+                    register.byte_6 = (Byte)(object)value;
+                    register.byte_7 = (Byte)(object)value;
+                    register.byte_8 = (Byte)(object)value;
+                    register.byte_9 = (Byte)(object)value;
+                    register.byte_10 = (Byte)(object)value;
+                    register.byte_11 = (Byte)(object)value;
+                    register.byte_12 = (Byte)(object)value;
+                    register.byte_13 = (Byte)(object)value;
+                    register.byte_14 = (Byte)(object)value;
+                    register.byte_15 = (Byte)(object)value;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = (SByte)(object)value;
+                    register.sbyte_1 = (SByte)(object)value;
+                    register.sbyte_2 = (SByte)(object)value;
+                    register.sbyte_3 = (SByte)(object)value;
+                    register.sbyte_4 = (SByte)(object)value;
+                    register.sbyte_5 = (SByte)(object)value;
+                    register.sbyte_6 = (SByte)(object)value;
+                    register.sbyte_7 = (SByte)(object)value;
+                    register.sbyte_8 = (SByte)(object)value;
+                    register.sbyte_9 = (SByte)(object)value;
+                    register.sbyte_10 = (SByte)(object)value;
+                    register.sbyte_11 = (SByte)(object)value;
+                    register.sbyte_12 = (SByte)(object)value;
+                    register.sbyte_13 = (SByte)(object)value;
+                    register.sbyte_14 = (SByte)(object)value;
+                    register.sbyte_15 = (SByte)(object)value;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = (UInt16)(object)value;
+                    register.uint16_1 = (UInt16)(object)value;
+                    register.uint16_2 = (UInt16)(object)value;
+                    register.uint16_3 = (UInt16)(object)value;
+                    register.uint16_4 = (UInt16)(object)value;
+                    register.uint16_5 = (UInt16)(object)value;
+                    register.uint16_6 = (UInt16)(object)value;
+                    register.uint16_7 = (UInt16)(object)value;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = (Int16)(object)value;
+                    register.int16_1 = (Int16)(object)value;
+                    register.int16_2 = (Int16)(object)value;
+                    register.int16_3 = (Int16)(object)value;
+                    register.int16_4 = (Int16)(object)value;
+                    register.int16_5 = (Int16)(object)value;
+                    register.int16_6 = (Int16)(object)value;
+                    register.int16_7 = (Int16)(object)value;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = (UInt32)(object)value;
+                    register.uint32_1 = (UInt32)(object)value;
+                    register.uint32_2 = (UInt32)(object)value;
+                    register.uint32_3 = (UInt32)(object)value;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = (Int32)(object)value;
+                    register.int32_1 = (Int32)(object)value;
+                    register.int32_2 = (Int32)(object)value;
+                    register.int32_3 = (Int32)(object)value;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = (UInt64)(object)value;
+                    register.uint64_1 = (UInt64)(object)value;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = (Int64)(object)value;
+                    register.int64_1 = (Int64)(object)value;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = (Single)(object)value;
+                    register.single_1 = (Single)(object)value;
+                    register.single_2 = (Single)(object)value;
+                    register.single_3 = (Single)(object)value;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = (Double)(object)value;
+                    register.double_1 = (Double)(object)value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Constructs a vector from the given array. The size of the given array must be at least Vector'T.Count.
+        /// </summary>
+        [JitIntrinsic]
+        public unsafe Vector(T[] values) : this(values, 0) { }
+
+        /// <summary>
+        /// Constructs a vector from the given array, starting from the given index.
+        /// The array must contain at least Vector'T.Count from the given index.
+        /// </summary>
+        public unsafe Vector(T[] values, int index)
+            : this()
+        {
+            if (values == null)
+            {
+                // Match the JIT's exception type here. For perf, a NullReference is thrown instead of an ArgumentNull.
+                throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
+            }
+            if (index < 0 || (values.Length - index) < Count)
+            {
+                throw new IndexOutOfRangeException();
+            }
+
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Byte)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (SByte)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt16)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int16)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt32)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int32)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (UInt64)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Int64)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Single)(object)values[g + index];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            *(basePtr + g) = (Double)(object)values[g + index];
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        *(basePtr + 0) = (Byte)(object)values[0 + index];
+                        *(basePtr + 1) = (Byte)(object)values[1 + index];
+                        *(basePtr + 2) = (Byte)(object)values[2 + index];
+                        *(basePtr + 3) = (Byte)(object)values[3 + index];
+                        *(basePtr + 4) = (Byte)(object)values[4 + index];
+                        *(basePtr + 5) = (Byte)(object)values[5 + index];
+                        *(basePtr + 6) = (Byte)(object)values[6 + index];
+                        *(basePtr + 7) = (Byte)(object)values[7 + index];
+                        *(basePtr + 8) = (Byte)(object)values[8 + index];
+                        *(basePtr + 9) = (Byte)(object)values[9 + index];
+                        *(basePtr + 10) = (Byte)(object)values[10 + index];
+                        *(basePtr + 11) = (Byte)(object)values[11 + index];
+                        *(basePtr + 12) = (Byte)(object)values[12 + index];
+                        *(basePtr + 13) = (Byte)(object)values[13 + index];
+                        *(basePtr + 14) = (Byte)(object)values[14 + index];
+                        *(basePtr + 15) = (Byte)(object)values[15 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        *(basePtr + 0) = (SByte)(object)values[0 + index];
+                        *(basePtr + 1) = (SByte)(object)values[1 + index];
+                        *(basePtr + 2) = (SByte)(object)values[2 + index];
+                        *(basePtr + 3) = (SByte)(object)values[3 + index];
+                        *(basePtr + 4) = (SByte)(object)values[4 + index];
+                        *(basePtr + 5) = (SByte)(object)values[5 + index];
+                        *(basePtr + 6) = (SByte)(object)values[6 + index];
+                        *(basePtr + 7) = (SByte)(object)values[7 + index];
+                        *(basePtr + 8) = (SByte)(object)values[8 + index];
+                        *(basePtr + 9) = (SByte)(object)values[9 + index];
+                        *(basePtr + 10) = (SByte)(object)values[10 + index];
+                        *(basePtr + 11) = (SByte)(object)values[11 + index];
+                        *(basePtr + 12) = (SByte)(object)values[12 + index];
+                        *(basePtr + 13) = (SByte)(object)values[13 + index];
+                        *(basePtr + 14) = (SByte)(object)values[14 + index];
+                        *(basePtr + 15) = (SByte)(object)values[15 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        *(basePtr + 0) = (UInt16)(object)values[0 + index];
+                        *(basePtr + 1) = (UInt16)(object)values[1 + index];
+                        *(basePtr + 2) = (UInt16)(object)values[2 + index];
+                        *(basePtr + 3) = (UInt16)(object)values[3 + index];
+                        *(basePtr + 4) = (UInt16)(object)values[4 + index];
+                        *(basePtr + 5) = (UInt16)(object)values[5 + index];
+                        *(basePtr + 6) = (UInt16)(object)values[6 + index];
+                        *(basePtr + 7) = (UInt16)(object)values[7 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        *(basePtr + 0) = (Int16)(object)values[0 + index];
+                        *(basePtr + 1) = (Int16)(object)values[1 + index];
+                        *(basePtr + 2) = (Int16)(object)values[2 + index];
+                        *(basePtr + 3) = (Int16)(object)values[3 + index];
+                        *(basePtr + 4) = (Int16)(object)values[4 + index];
+                        *(basePtr + 5) = (Int16)(object)values[5 + index];
+                        *(basePtr + 6) = (Int16)(object)values[6 + index];
+                        *(basePtr + 7) = (Int16)(object)values[7 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        *(basePtr + 0) = (UInt32)(object)values[0 + index];
+                        *(basePtr + 1) = (UInt32)(object)values[1 + index];
+                        *(basePtr + 2) = (UInt32)(object)values[2 + index];
+                        *(basePtr + 3) = (UInt32)(object)values[3 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        *(basePtr + 0) = (Int32)(object)values[0 + index];
+                        *(basePtr + 1) = (Int32)(object)values[1 + index];
+                        *(basePtr + 2) = (Int32)(object)values[2 + index];
+                        *(basePtr + 3) = (Int32)(object)values[3 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        *(basePtr + 0) = (UInt64)(object)values[0 + index];
+                        *(basePtr + 1) = (UInt64)(object)values[1 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        *(basePtr + 0) = (Int64)(object)values[0 + index];
+                        *(basePtr + 1) = (Int64)(object)values[1 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        *(basePtr + 0) = (Single)(object)values[0 + index];
+                        *(basePtr + 1) = (Single)(object)values[1 + index];
+                        *(basePtr + 2) = (Single)(object)values[2 + index];
+                        *(basePtr + 3) = (Single)(object)values[3 + index];
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        *(basePtr + 0) = (Double)(object)values[0 + index];
+                        *(basePtr + 1) = (Double)(object)values[1 + index];
+                    }
+                }
+            }
+        }
+
+#pragma warning disable 3001 // void* is not a CLS-Compliant argument type
+        private unsafe Vector(void* dataPointer) : this(dataPointer, 0) { }
+#pragma warning restore 3001 // void* is not a CLS-Compliant argument type
+
+#pragma warning disable 3001 // void* is not a CLS-Compliant argument type
+        // Implemented with offset if this API ever becomes public; an offset of 0 is used internally.
+        private unsafe Vector(void* dataPointer, int offset)
+            : this()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                Byte* castedPtr = (Byte*)dataPointer;
+                castedPtr += offset;
+                fixed (Byte* registerBase = &this.register.byte_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                SByte* castedPtr = (SByte*)dataPointer;
+                castedPtr += offset;
+                fixed (SByte* registerBase = &this.register.sbyte_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                UInt16* castedPtr = (UInt16*)dataPointer;
+                castedPtr += offset;
+                fixed (UInt16* registerBase = &this.register.uint16_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                Int16* castedPtr = (Int16*)dataPointer;
+                castedPtr += offset;
+                fixed (Int16* registerBase = &this.register.int16_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                UInt32* castedPtr = (UInt32*)dataPointer;
+                castedPtr += offset;
+                fixed (UInt32* registerBase = &this.register.uint32_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                Int32* castedPtr = (Int32*)dataPointer;
+                castedPtr += offset;
+                fixed (Int32* registerBase = &this.register.int32_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                UInt64* castedPtr = (UInt64*)dataPointer;
+                castedPtr += offset;
+                fixed (UInt64* registerBase = &this.register.uint64_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                Int64* castedPtr = (Int64*)dataPointer;
+                castedPtr += offset;
+                fixed (Int64* registerBase = &this.register.int64_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                Single* castedPtr = (Single*)dataPointer;
+                castedPtr += offset;
+                fixed (Single* registerBase = &this.register.single_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                Double* castedPtr = (Double*)dataPointer;
+                castedPtr += offset;
+                fixed (Double* registerBase = &this.register.double_0)
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        registerBase[g] = castedPtr[g];
+                    }
+                }
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+#pragma warning restore 3001 // void* is not a CLS-Compliant argument type
+
+        private Vector(ref Register existingRegister)
+        {
+            this.register = existingRegister;
+        }
+        #endregion Constructors
+
+        #region Public Instance Methods
+        /// <summary>
+        /// Copies the vector to the given destination array. The destination array must be at least size Vector'T.Count.
+        /// </summary>
+        /// <param name="destination">The destination array which the values are copied into</param>
+        /// <exception cref="ArgumentNullException">If the destination array is null</exception>
+        /// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination array</exception>
+        [JitIntrinsic]
+        public unsafe void CopyTo(T[] destination)
+        {
+            CopyTo(destination, 0);
+        }
+
+        /// <summary>
+        /// Copies the vector to the given destination array. The destination array must be at least size Vector'T.Count.
+        /// </summary>
+        /// <param name="destination">The destination array which the values are copied into</param>
+        /// <param name="startIndex">The index to start copying to</param>
+        /// <exception cref="ArgumentNullException">If the destination array is null</exception>
+        /// <exception cref="ArgumentOutOfRangeException">If index is greater than end of the array or index is less than zero</exception>
+        /// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination array</exception>
+        [JitIntrinsic]
+        public unsafe void CopyTo(T[] destination, int startIndex)
+        {
+            if (destination == null)
+            {
+                // Match the JIT's exception type here. For perf, a NullReference is thrown instead of an ArgumentNull.
+                throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
+            }
+            if (startIndex < 0 || startIndex >= destination.Length)
+            {
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.Format(SR.Arg_ArgumentOutOfRangeException, startIndex));
+            }
+            if ((destination.Length - startIndex) < Count)
+            {
+                throw new ArgumentException(SR.Format(SR.Arg_ElementsInSourceIsGreaterThanDestination, startIndex));
+            }
+
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte[] byteArray = (Byte[])(object)destination;
+                    fixed (Byte* destinationBase = byteArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Byte)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte[] sbyteArray = (SByte[])(object)destination;
+                    fixed (SByte* destinationBase = sbyteArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (SByte)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16[] uint16Array = (UInt16[])(object)destination;
+                    fixed (UInt16* destinationBase = uint16Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (UInt16)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16[] int16Array = (Int16[])(object)destination;
+                    fixed (Int16* destinationBase = int16Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Int16)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32[] uint32Array = (UInt32[])(object)destination;
+                    fixed (UInt32* destinationBase = uint32Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (UInt32)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32[] int32Array = (Int32[])(object)destination;
+                    fixed (Int32* destinationBase = int32Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Int32)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64[] uint64Array = (UInt64[])(object)destination;
+                    fixed (UInt64* destinationBase = uint64Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (UInt64)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64[] int64Array = (Int64[])(object)destination;
+                    fixed (Int64* destinationBase = int64Array)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Int64)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single[] singleArray = (Single[])(object)destination;
+                    fixed (Single* destinationBase = singleArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Single)(object)this[g];
+                        }
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double[] doubleArray = (Double[])(object)destination;
+                    fixed (Double* destinationBase = doubleArray)
+                    {
+                        for (int g = 0; g < Count; g++)
+                        {
+                            destinationBase[startIndex + g] = (Double)(object)this[g];
+                        }
+                    }
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte[] byteArray = (Byte[])(object)destination;
+                    fixed (Byte* destinationBase = byteArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.byte_0;
+                        destinationBase[startIndex + 1] = this.register.byte_1;
+                        destinationBase[startIndex + 2] = this.register.byte_2;
+                        destinationBase[startIndex + 3] = this.register.byte_3;
+                        destinationBase[startIndex + 4] = this.register.byte_4;
+                        destinationBase[startIndex + 5] = this.register.byte_5;
+                        destinationBase[startIndex + 6] = this.register.byte_6;
+                        destinationBase[startIndex + 7] = this.register.byte_7;
+                        destinationBase[startIndex + 8] = this.register.byte_8;
+                        destinationBase[startIndex + 9] = this.register.byte_9;
+                        destinationBase[startIndex + 10] = this.register.byte_10;
+                        destinationBase[startIndex + 11] = this.register.byte_11;
+                        destinationBase[startIndex + 12] = this.register.byte_12;
+                        destinationBase[startIndex + 13] = this.register.byte_13;
+                        destinationBase[startIndex + 14] = this.register.byte_14;
+                        destinationBase[startIndex + 15] = this.register.byte_15;
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte[] sbyteArray = (SByte[])(object)destination;
+                    fixed (SByte* destinationBase = sbyteArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.sbyte_0;
+                        destinationBase[startIndex + 1] = this.register.sbyte_1;
+                        destinationBase[startIndex + 2] = this.register.sbyte_2;
+                        destinationBase[startIndex + 3] = this.register.sbyte_3;
+                        destinationBase[startIndex + 4] = this.register.sbyte_4;
+                        destinationBase[startIndex + 5] = this.register.sbyte_5;
+                        destinationBase[startIndex + 6] = this.register.sbyte_6;
+                        destinationBase[startIndex + 7] = this.register.sbyte_7;
+                        destinationBase[startIndex + 8] = this.register.sbyte_8;
+                        destinationBase[startIndex + 9] = this.register.sbyte_9;
+                        destinationBase[startIndex + 10] = this.register.sbyte_10;
+                        destinationBase[startIndex + 11] = this.register.sbyte_11;
+                        destinationBase[startIndex + 12] = this.register.sbyte_12;
+                        destinationBase[startIndex + 13] = this.register.sbyte_13;
+                        destinationBase[startIndex + 14] = this.register.sbyte_14;
+                        destinationBase[startIndex + 15] = this.register.sbyte_15;
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16[] uint16Array = (UInt16[])(object)destination;
+                    fixed (UInt16* destinationBase = uint16Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.uint16_0;
+                        destinationBase[startIndex + 1] = this.register.uint16_1;
+                        destinationBase[startIndex + 2] = this.register.uint16_2;
+                        destinationBase[startIndex + 3] = this.register.uint16_3;
+                        destinationBase[startIndex + 4] = this.register.uint16_4;
+                        destinationBase[startIndex + 5] = this.register.uint16_5;
+                        destinationBase[startIndex + 6] = this.register.uint16_6;
+                        destinationBase[startIndex + 7] = this.register.uint16_7;
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16[] int16Array = (Int16[])(object)destination;
+                    fixed (Int16* destinationBase = int16Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.int16_0;
+                        destinationBase[startIndex + 1] = this.register.int16_1;
+                        destinationBase[startIndex + 2] = this.register.int16_2;
+                        destinationBase[startIndex + 3] = this.register.int16_3;
+                        destinationBase[startIndex + 4] = this.register.int16_4;
+                        destinationBase[startIndex + 5] = this.register.int16_5;
+                        destinationBase[startIndex + 6] = this.register.int16_6;
+                        destinationBase[startIndex + 7] = this.register.int16_7;
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32[] uint32Array = (UInt32[])(object)destination;
+                    fixed (UInt32* destinationBase = uint32Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.uint32_0;
+                        destinationBase[startIndex + 1] = this.register.uint32_1;
+                        destinationBase[startIndex + 2] = this.register.uint32_2;
+                        destinationBase[startIndex + 3] = this.register.uint32_3;
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32[] int32Array = (Int32[])(object)destination;
+                    fixed (Int32* destinationBase = int32Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.int32_0;
+                        destinationBase[startIndex + 1] = this.register.int32_1;
+                        destinationBase[startIndex + 2] = this.register.int32_2;
+                        destinationBase[startIndex + 3] = this.register.int32_3;
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64[] uint64Array = (UInt64[])(object)destination;
+                    fixed (UInt64* destinationBase = uint64Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.uint64_0;
+                        destinationBase[startIndex + 1] = this.register.uint64_1;
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64[] int64Array = (Int64[])(object)destination;
+                    fixed (Int64* destinationBase = int64Array)
+                    {
+                        destinationBase[startIndex + 0] = this.register.int64_0;
+                        destinationBase[startIndex + 1] = this.register.int64_1;
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single[] singleArray = (Single[])(object)destination;
+                    fixed (Single* destinationBase = singleArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.single_0;
+                        destinationBase[startIndex + 1] = this.register.single_1;
+                        destinationBase[startIndex + 2] = this.register.single_2;
+                        destinationBase[startIndex + 3] = this.register.single_3;
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double[] doubleArray = (Double[])(object)destination;
+                    fixed (Double* destinationBase = doubleArray)
+                    {
+                        destinationBase[startIndex + 0] = this.register.double_0;
+                        destinationBase[startIndex + 1] = this.register.double_1;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns the element at the given index.
+        /// </summary>
+        [JitIntrinsic]
+        public unsafe T this[int index]
+        {
+            get
+            {
+                if (index >= Count || index < 0)
+                {
+                    throw new IndexOutOfRangeException(SR.Format(SR.Arg_ArgumentOutOfRangeException, index));
+                }
+                if (typeof(T) == typeof(Byte))
+                {
+                    fixed (Byte* basePtr = &this.register.byte_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    fixed (SByte* basePtr = &this.register.sbyte_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    fixed (UInt16* basePtr = &this.register.uint16_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    fixed (Int16* basePtr = &this.register.int16_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    fixed (UInt32* basePtr = &this.register.uint32_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    fixed (Int32* basePtr = &this.register.int32_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    fixed (UInt64* basePtr = &this.register.uint64_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    fixed (Int64* basePtr = &this.register.int64_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    fixed (Single* basePtr = &this.register.single_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    fixed (Double* basePtr = &this.register.double_0)
+                    {
+                        return (T)(object)*(basePtr + index);
+                    }
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether the given Object is equal to this vector instance.
+        /// </summary>
+        /// <param name="obj">The Object to compare against.</param>
+        /// <returns>True if the Object is equal to this vector; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public override bool Equals(object obj)
+        {
+            if (!(obj is Vector<T>))
+            {
+                return false;
+            }
+            return Equals((Vector<T>)obj);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether the given vector is equal to this vector instance.
+        /// </summary>
+        /// <param name="other">The vector to compare this instance to.</param>
+        /// <returns>True if the other vector is equal to this instance; False otherwise.</returns>
+        [JitIntrinsic]
+        public bool Equals(Vector<T> other)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                for (int g = 0; g < Count; g++)
+                {
+                    if (!ScalarEquals(this[g], other[g]))
+                    {
+                        return false;
+                    }
+                }
+                return true;
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    return
+                        this.register.byte_0 == other.register.byte_0
+                        && this.register.byte_1 == other.register.byte_1
+                        && this.register.byte_2 == other.register.byte_2
+                        && this.register.byte_3 == other.register.byte_3
+                        && this.register.byte_4 == other.register.byte_4
+                        && this.register.byte_5 == other.register.byte_5
+                        && this.register.byte_6 == other.register.byte_6
+                        && this.register.byte_7 == other.register.byte_7
+                        && this.register.byte_8 == other.register.byte_8
+                        && this.register.byte_9 == other.register.byte_9
+                        && this.register.byte_10 == other.register.byte_10
+                        && this.register.byte_11 == other.register.byte_11
+                        && this.register.byte_12 == other.register.byte_12
+                        && this.register.byte_13 == other.register.byte_13
+                        && this.register.byte_14 == other.register.byte_14
+                        && this.register.byte_15 == other.register.byte_15;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    return
+                        this.register.sbyte_0 == other.register.sbyte_0
+                        && this.register.sbyte_1 == other.register.sbyte_1
+                        && this.register.sbyte_2 == other.register.sbyte_2
+                        && this.register.sbyte_3 == other.register.sbyte_3
+                        && this.register.sbyte_4 == other.register.sbyte_4
+                        && this.register.sbyte_5 == other.register.sbyte_5
+                        && this.register.sbyte_6 == other.register.sbyte_6
+                        && this.register.sbyte_7 == other.register.sbyte_7
+                        && this.register.sbyte_8 == other.register.sbyte_8
+                        && this.register.sbyte_9 == other.register.sbyte_9
+                        && this.register.sbyte_10 == other.register.sbyte_10
+                        && this.register.sbyte_11 == other.register.sbyte_11
+                        && this.register.sbyte_12 == other.register.sbyte_12
+                        && this.register.sbyte_13 == other.register.sbyte_13
+                        && this.register.sbyte_14 == other.register.sbyte_14
+                        && this.register.sbyte_15 == other.register.sbyte_15;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    return
+                        this.register.uint16_0 == other.register.uint16_0
+                        && this.register.uint16_1 == other.register.uint16_1
+                        && this.register.uint16_2 == other.register.uint16_2
+                        && this.register.uint16_3 == other.register.uint16_3
+                        && this.register.uint16_4 == other.register.uint16_4
+                        && this.register.uint16_5 == other.register.uint16_5
+                        && this.register.uint16_6 == other.register.uint16_6
+                        && this.register.uint16_7 == other.register.uint16_7;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    return
+                        this.register.int16_0 == other.register.int16_0
+                        && this.register.int16_1 == other.register.int16_1
+                        && this.register.int16_2 == other.register.int16_2
+                        && this.register.int16_3 == other.register.int16_3
+                        && this.register.int16_4 == other.register.int16_4
+                        && this.register.int16_5 == other.register.int16_5
+                        && this.register.int16_6 == other.register.int16_6
+                        && this.register.int16_7 == other.register.int16_7;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    return
+                        this.register.uint32_0 == other.register.uint32_0
+                        && this.register.uint32_1 == other.register.uint32_1
+                        && this.register.uint32_2 == other.register.uint32_2
+                        && this.register.uint32_3 == other.register.uint32_3;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    return
+                        this.register.int32_0 == other.register.int32_0
+                        && this.register.int32_1 == other.register.int32_1
+                        && this.register.int32_2 == other.register.int32_2
+                        && this.register.int32_3 == other.register.int32_3;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    return
+                        this.register.uint64_0 == other.register.uint64_0
+                        && this.register.uint64_1 == other.register.uint64_1;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    return
+                        this.register.int64_0 == other.register.int64_0
+                        && this.register.int64_1 == other.register.int64_1;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    return
+                        this.register.single_0 == other.register.single_0
+                        && this.register.single_1 == other.register.single_1
+                        && this.register.single_2 == other.register.single_2
+                        && this.register.single_3 == other.register.single_3;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    return
+                        this.register.double_0 == other.register.double_0
+                        && this.register.double_1 == other.register.double_1;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns the hash code for this instance.
+        /// </summary>
+        /// <returns>The hash code.</returns>
+        public override int GetHashCode()
+        {
+            int hash = 0;
+
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Byte)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((SByte)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((UInt16)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Int16)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((UInt32)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Int32)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((UInt64)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Int64)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Single)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    for (int g = 0; g < Count; g++)
+                    {
+                        hash = HashCodeHelper.CombineHashCodes(hash, ((Double)(object)this[g]).GetHashCode());
+                    }
+                    return hash;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_7.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_8.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_9.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_10.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_11.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_12.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_13.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_14.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.byte_15.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_7.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_8.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_9.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_10.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_11.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_12.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_13.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_14.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.sbyte_15.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint16_7.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_3.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_4.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_5.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_6.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int16_7.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint32_3.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int32_3.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint64_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.uint64_1.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int64_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.int64_1.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_1.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_2.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.single_3.GetHashCode());
+                    return hash;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.double_0.GetHashCode());
+                    hash = HashCodeHelper.CombineHashCodes(hash, this.register.double_1.GetHashCode());
+                    return hash;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Returns a String representing this vector.
+        /// </summary>
+        /// <returns>The string representation.</returns>
+        public override string ToString()
+        {
+            return ToString("G", CultureInfo.CurrentCulture);
+        }
+
+        /// <summary>
+        /// Returns a String representing this vector, using the specified format string to format individual elements.
+        /// </summary>
+        /// <param name="format">The format of individual elements.</param>
+        /// <returns>The string representation.</returns>
+        public string ToString(string format)
+        {
+            return ToString(format, CultureInfo.CurrentCulture);
+        }
+
+        /// <summary>
+        /// Returns a String representing this vector, using the specified format string to format individual elements
+        /// and the given IFormatProvider.
+        /// </summary>
+        /// <param name="format">The format of individual elements.</param>
+        /// <param name="formatProvider">The format provider to use when formatting elements.</param>
+        /// <returns>The string representation.</returns>
+        public string ToString(string format, IFormatProvider formatProvider)
+        {
+            StringBuilder sb = new StringBuilder();
+            string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
+            sb.Append('<');
+            for (int g = 0; g < Count - 1; g++)
+            {
+                sb.Append(((IFormattable)this[g]).ToString(format, formatProvider));
+                sb.Append(separator);
+                sb.Append(' ');
+            }
+            // Append last element w/out separator
+            sb.Append(((IFormattable)this[Count - 1]).ToString(format, formatProvider));
+            sb.Append('>');
+            return sb.ToString();
+        }
+        #endregion Public Instance Methods
+
+        #region Arithmetic Operators
+        /// <summary>
+        /// Adds two vectors together.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The summed vector.</returns>
+        public static unsafe Vector<T> operator +(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarAdd(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> sum = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        sum.register.byte_0 = (Byte)(left.register.byte_0 + right.register.byte_0);
+                        sum.register.byte_1 = (Byte)(left.register.byte_1 + right.register.byte_1);
+                        sum.register.byte_2 = (Byte)(left.register.byte_2 + right.register.byte_2);
+                        sum.register.byte_3 = (Byte)(left.register.byte_3 + right.register.byte_3);
+                        sum.register.byte_4 = (Byte)(left.register.byte_4 + right.register.byte_4);
+                        sum.register.byte_5 = (Byte)(left.register.byte_5 + right.register.byte_5);
+                        sum.register.byte_6 = (Byte)(left.register.byte_6 + right.register.byte_6);
+                        sum.register.byte_7 = (Byte)(left.register.byte_7 + right.register.byte_7);
+                        sum.register.byte_8 = (Byte)(left.register.byte_8 + right.register.byte_8);
+                        sum.register.byte_9 = (Byte)(left.register.byte_9 + right.register.byte_9);
+                        sum.register.byte_10 = (Byte)(left.register.byte_10 + right.register.byte_10);
+                        sum.register.byte_11 = (Byte)(left.register.byte_11 + right.register.byte_11);
+                        sum.register.byte_12 = (Byte)(left.register.byte_12 + right.register.byte_12);
+                        sum.register.byte_13 = (Byte)(left.register.byte_13 + right.register.byte_13);
+                        sum.register.byte_14 = (Byte)(left.register.byte_14 + right.register.byte_14);
+                        sum.register.byte_15 = (Byte)(left.register.byte_15 + right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        sum.register.sbyte_0 = (SByte)(left.register.sbyte_0 + right.register.sbyte_0);
+                        sum.register.sbyte_1 = (SByte)(left.register.sbyte_1 + right.register.sbyte_1);
+                        sum.register.sbyte_2 = (SByte)(left.register.sbyte_2 + right.register.sbyte_2);
+                        sum.register.sbyte_3 = (SByte)(left.register.sbyte_3 + right.register.sbyte_3);
+                        sum.register.sbyte_4 = (SByte)(left.register.sbyte_4 + right.register.sbyte_4);
+                        sum.register.sbyte_5 = (SByte)(left.register.sbyte_5 + right.register.sbyte_5);
+                        sum.register.sbyte_6 = (SByte)(left.register.sbyte_6 + right.register.sbyte_6);
+                        sum.register.sbyte_7 = (SByte)(left.register.sbyte_7 + right.register.sbyte_7);
+                        sum.register.sbyte_8 = (SByte)(left.register.sbyte_8 + right.register.sbyte_8);
+                        sum.register.sbyte_9 = (SByte)(left.register.sbyte_9 + right.register.sbyte_9);
+                        sum.register.sbyte_10 = (SByte)(left.register.sbyte_10 + right.register.sbyte_10);
+                        sum.register.sbyte_11 = (SByte)(left.register.sbyte_11 + right.register.sbyte_11);
+                        sum.register.sbyte_12 = (SByte)(left.register.sbyte_12 + right.register.sbyte_12);
+                        sum.register.sbyte_13 = (SByte)(left.register.sbyte_13 + right.register.sbyte_13);
+                        sum.register.sbyte_14 = (SByte)(left.register.sbyte_14 + right.register.sbyte_14);
+                        sum.register.sbyte_15 = (SByte)(left.register.sbyte_15 + right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        sum.register.uint16_0 = (UInt16)(left.register.uint16_0 + right.register.uint16_0);
+                        sum.register.uint16_1 = (UInt16)(left.register.uint16_1 + right.register.uint16_1);
+                        sum.register.uint16_2 = (UInt16)(left.register.uint16_2 + right.register.uint16_2);
+                        sum.register.uint16_3 = (UInt16)(left.register.uint16_3 + right.register.uint16_3);
+                        sum.register.uint16_4 = (UInt16)(left.register.uint16_4 + right.register.uint16_4);
+                        sum.register.uint16_5 = (UInt16)(left.register.uint16_5 + right.register.uint16_5);
+                        sum.register.uint16_6 = (UInt16)(left.register.uint16_6 + right.register.uint16_6);
+                        sum.register.uint16_7 = (UInt16)(left.register.uint16_7 + right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        sum.register.int16_0 = (Int16)(left.register.int16_0 + right.register.int16_0);
+                        sum.register.int16_1 = (Int16)(left.register.int16_1 + right.register.int16_1);
+                        sum.register.int16_2 = (Int16)(left.register.int16_2 + right.register.int16_2);
+                        sum.register.int16_3 = (Int16)(left.register.int16_3 + right.register.int16_3);
+                        sum.register.int16_4 = (Int16)(left.register.int16_4 + right.register.int16_4);
+                        sum.register.int16_5 = (Int16)(left.register.int16_5 + right.register.int16_5);
+                        sum.register.int16_6 = (Int16)(left.register.int16_6 + right.register.int16_6);
+                        sum.register.int16_7 = (Int16)(left.register.int16_7 + right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        sum.register.uint32_0 = (UInt32)(left.register.uint32_0 + right.register.uint32_0);
+                        sum.register.uint32_1 = (UInt32)(left.register.uint32_1 + right.register.uint32_1);
+                        sum.register.uint32_2 = (UInt32)(left.register.uint32_2 + right.register.uint32_2);
+                        sum.register.uint32_3 = (UInt32)(left.register.uint32_3 + right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        sum.register.int32_0 = (Int32)(left.register.int32_0 + right.register.int32_0);
+                        sum.register.int32_1 = (Int32)(left.register.int32_1 + right.register.int32_1);
+                        sum.register.int32_2 = (Int32)(left.register.int32_2 + right.register.int32_2);
+                        sum.register.int32_3 = (Int32)(left.register.int32_3 + right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        sum.register.uint64_0 = (UInt64)(left.register.uint64_0 + right.register.uint64_0);
+                        sum.register.uint64_1 = (UInt64)(left.register.uint64_1 + right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        sum.register.int64_0 = (Int64)(left.register.int64_0 + right.register.int64_0);
+                        sum.register.int64_1 = (Int64)(left.register.int64_1 + right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        sum.register.single_0 = (Single)(left.register.single_0 + right.register.single_0);
+                        sum.register.single_1 = (Single)(left.register.single_1 + right.register.single_1);
+                        sum.register.single_2 = (Single)(left.register.single_2 + right.register.single_2);
+                        sum.register.single_3 = (Single)(left.register.single_3 + right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        sum.register.double_0 = (Double)(left.register.double_0 + right.register.double_0);
+                        sum.register.double_1 = (Double)(left.register.double_1 + right.register.double_1);
+                    }
+                    return sum;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Subtracts the second vector from the first.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The difference vector.</returns>
+        public static unsafe Vector<T> operator -(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarSubtract(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> difference = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        difference.register.byte_0 = (Byte)(left.register.byte_0 - right.register.byte_0);
+                        difference.register.byte_1 = (Byte)(left.register.byte_1 - right.register.byte_1);
+                        difference.register.byte_2 = (Byte)(left.register.byte_2 - right.register.byte_2);
+                        difference.register.byte_3 = (Byte)(left.register.byte_3 - right.register.byte_3);
+                        difference.register.byte_4 = (Byte)(left.register.byte_4 - right.register.byte_4);
+                        difference.register.byte_5 = (Byte)(left.register.byte_5 - right.register.byte_5);
+                        difference.register.byte_6 = (Byte)(left.register.byte_6 - right.register.byte_6);
+                        difference.register.byte_7 = (Byte)(left.register.byte_7 - right.register.byte_7);
+                        difference.register.byte_8 = (Byte)(left.register.byte_8 - right.register.byte_8);
+                        difference.register.byte_9 = (Byte)(left.register.byte_9 - right.register.byte_9);
+                        difference.register.byte_10 = (Byte)(left.register.byte_10 - right.register.byte_10);
+                        difference.register.byte_11 = (Byte)(left.register.byte_11 - right.register.byte_11);
+                        difference.register.byte_12 = (Byte)(left.register.byte_12 - right.register.byte_12);
+                        difference.register.byte_13 = (Byte)(left.register.byte_13 - right.register.byte_13);
+                        difference.register.byte_14 = (Byte)(left.register.byte_14 - right.register.byte_14);
+                        difference.register.byte_15 = (Byte)(left.register.byte_15 - right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        difference.register.sbyte_0 = (SByte)(left.register.sbyte_0 - right.register.sbyte_0);
+                        difference.register.sbyte_1 = (SByte)(left.register.sbyte_1 - right.register.sbyte_1);
+                        difference.register.sbyte_2 = (SByte)(left.register.sbyte_2 - right.register.sbyte_2);
+                        difference.register.sbyte_3 = (SByte)(left.register.sbyte_3 - right.register.sbyte_3);
+                        difference.register.sbyte_4 = (SByte)(left.register.sbyte_4 - right.register.sbyte_4);
+                        difference.register.sbyte_5 = (SByte)(left.register.sbyte_5 - right.register.sbyte_5);
+                        difference.register.sbyte_6 = (SByte)(left.register.sbyte_6 - right.register.sbyte_6);
+                        difference.register.sbyte_7 = (SByte)(left.register.sbyte_7 - right.register.sbyte_7);
+                        difference.register.sbyte_8 = (SByte)(left.register.sbyte_8 - right.register.sbyte_8);
+                        difference.register.sbyte_9 = (SByte)(left.register.sbyte_9 - right.register.sbyte_9);
+                        difference.register.sbyte_10 = (SByte)(left.register.sbyte_10 - right.register.sbyte_10);
+                        difference.register.sbyte_11 = (SByte)(left.register.sbyte_11 - right.register.sbyte_11);
+                        difference.register.sbyte_12 = (SByte)(left.register.sbyte_12 - right.register.sbyte_12);
+                        difference.register.sbyte_13 = (SByte)(left.register.sbyte_13 - right.register.sbyte_13);
+                        difference.register.sbyte_14 = (SByte)(left.register.sbyte_14 - right.register.sbyte_14);
+                        difference.register.sbyte_15 = (SByte)(left.register.sbyte_15 - right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        difference.register.uint16_0 = (UInt16)(left.register.uint16_0 - right.register.uint16_0);
+                        difference.register.uint16_1 = (UInt16)(left.register.uint16_1 - right.register.uint16_1);
+                        difference.register.uint16_2 = (UInt16)(left.register.uint16_2 - right.register.uint16_2);
+                        difference.register.uint16_3 = (UInt16)(left.register.uint16_3 - right.register.uint16_3);
+                        difference.register.uint16_4 = (UInt16)(left.register.uint16_4 - right.register.uint16_4);
+                        difference.register.uint16_5 = (UInt16)(left.register.uint16_5 - right.register.uint16_5);
+                        difference.register.uint16_6 = (UInt16)(left.register.uint16_6 - right.register.uint16_6);
+                        difference.register.uint16_7 = (UInt16)(left.register.uint16_7 - right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        difference.register.int16_0 = (Int16)(left.register.int16_0 - right.register.int16_0);
+                        difference.register.int16_1 = (Int16)(left.register.int16_1 - right.register.int16_1);
+                        difference.register.int16_2 = (Int16)(left.register.int16_2 - right.register.int16_2);
+                        difference.register.int16_3 = (Int16)(left.register.int16_3 - right.register.int16_3);
+                        difference.register.int16_4 = (Int16)(left.register.int16_4 - right.register.int16_4);
+                        difference.register.int16_5 = (Int16)(left.register.int16_5 - right.register.int16_5);
+                        difference.register.int16_6 = (Int16)(left.register.int16_6 - right.register.int16_6);
+                        difference.register.int16_7 = (Int16)(left.register.int16_7 - right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        difference.register.uint32_0 = (UInt32)(left.register.uint32_0 - right.register.uint32_0);
+                        difference.register.uint32_1 = (UInt32)(left.register.uint32_1 - right.register.uint32_1);
+                        difference.register.uint32_2 = (UInt32)(left.register.uint32_2 - right.register.uint32_2);
+                        difference.register.uint32_3 = (UInt32)(left.register.uint32_3 - right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        difference.register.int32_0 = (Int32)(left.register.int32_0 - right.register.int32_0);
+                        difference.register.int32_1 = (Int32)(left.register.int32_1 - right.register.int32_1);
+                        difference.register.int32_2 = (Int32)(left.register.int32_2 - right.register.int32_2);
+                        difference.register.int32_3 = (Int32)(left.register.int32_3 - right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        difference.register.uint64_0 = (UInt64)(left.register.uint64_0 - right.register.uint64_0);
+                        difference.register.uint64_1 = (UInt64)(left.register.uint64_1 - right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        difference.register.int64_0 = (Int64)(left.register.int64_0 - right.register.int64_0);
+                        difference.register.int64_1 = (Int64)(left.register.int64_1 - right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        difference.register.single_0 = (Single)(left.register.single_0 - right.register.single_0);
+                        difference.register.single_1 = (Single)(left.register.single_1 - right.register.single_1);
+                        difference.register.single_2 = (Single)(left.register.single_2 - right.register.single_2);
+                        difference.register.single_3 = (Single)(left.register.single_3 - right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        difference.register.double_0 = (Double)(left.register.double_0 - right.register.double_0);
+                        difference.register.double_1 = (Double)(left.register.double_1 - right.register.double_1);
+                    }
+                    return difference;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Multiplies two vectors together.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The product vector.</returns>
+        public static unsafe Vector<T> operator *(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarMultiply(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> product = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        product.register.byte_0 = (Byte)(left.register.byte_0 * right.register.byte_0);
+                        product.register.byte_1 = (Byte)(left.register.byte_1 * right.register.byte_1);
+                        product.register.byte_2 = (Byte)(left.register.byte_2 * right.register.byte_2);
+                        product.register.byte_3 = (Byte)(left.register.byte_3 * right.register.byte_3);
+                        product.register.byte_4 = (Byte)(left.register.byte_4 * right.register.byte_4);
+                        product.register.byte_5 = (Byte)(left.register.byte_5 * right.register.byte_5);
+                        product.register.byte_6 = (Byte)(left.register.byte_6 * right.register.byte_6);
+                        product.register.byte_7 = (Byte)(left.register.byte_7 * right.register.byte_7);
+                        product.register.byte_8 = (Byte)(left.register.byte_8 * right.register.byte_8);
+                        product.register.byte_9 = (Byte)(left.register.byte_9 * right.register.byte_9);
+                        product.register.byte_10 = (Byte)(left.register.byte_10 * right.register.byte_10);
+                        product.register.byte_11 = (Byte)(left.register.byte_11 * right.register.byte_11);
+                        product.register.byte_12 = (Byte)(left.register.byte_12 * right.register.byte_12);
+                        product.register.byte_13 = (Byte)(left.register.byte_13 * right.register.byte_13);
+                        product.register.byte_14 = (Byte)(left.register.byte_14 * right.register.byte_14);
+                        product.register.byte_15 = (Byte)(left.register.byte_15 * right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        product.register.sbyte_0 = (SByte)(left.register.sbyte_0 * right.register.sbyte_0);
+                        product.register.sbyte_1 = (SByte)(left.register.sbyte_1 * right.register.sbyte_1);
+                        product.register.sbyte_2 = (SByte)(left.register.sbyte_2 * right.register.sbyte_2);
+                        product.register.sbyte_3 = (SByte)(left.register.sbyte_3 * right.register.sbyte_3);
+                        product.register.sbyte_4 = (SByte)(left.register.sbyte_4 * right.register.sbyte_4);
+                        product.register.sbyte_5 = (SByte)(left.register.sbyte_5 * right.register.sbyte_5);
+                        product.register.sbyte_6 = (SByte)(left.register.sbyte_6 * right.register.sbyte_6);
+                        product.register.sbyte_7 = (SByte)(left.register.sbyte_7 * right.register.sbyte_7);
+                        product.register.sbyte_8 = (SByte)(left.register.sbyte_8 * right.register.sbyte_8);
+                        product.register.sbyte_9 = (SByte)(left.register.sbyte_9 * right.register.sbyte_9);
+                        product.register.sbyte_10 = (SByte)(left.register.sbyte_10 * right.register.sbyte_10);
+                        product.register.sbyte_11 = (SByte)(left.register.sbyte_11 * right.register.sbyte_11);
+                        product.register.sbyte_12 = (SByte)(left.register.sbyte_12 * right.register.sbyte_12);
+                        product.register.sbyte_13 = (SByte)(left.register.sbyte_13 * right.register.sbyte_13);
+                        product.register.sbyte_14 = (SByte)(left.register.sbyte_14 * right.register.sbyte_14);
+                        product.register.sbyte_15 = (SByte)(left.register.sbyte_15 * right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        product.register.uint16_0 = (UInt16)(left.register.uint16_0 * right.register.uint16_0);
+                        product.register.uint16_1 = (UInt16)(left.register.uint16_1 * right.register.uint16_1);
+                        product.register.uint16_2 = (UInt16)(left.register.uint16_2 * right.register.uint16_2);
+                        product.register.uint16_3 = (UInt16)(left.register.uint16_3 * right.register.uint16_3);
+                        product.register.uint16_4 = (UInt16)(left.register.uint16_4 * right.register.uint16_4);
+                        product.register.uint16_5 = (UInt16)(left.register.uint16_5 * right.register.uint16_5);
+                        product.register.uint16_6 = (UInt16)(left.register.uint16_6 * right.register.uint16_6);
+                        product.register.uint16_7 = (UInt16)(left.register.uint16_7 * right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        product.register.int16_0 = (Int16)(left.register.int16_0 * right.register.int16_0);
+                        product.register.int16_1 = (Int16)(left.register.int16_1 * right.register.int16_1);
+                        product.register.int16_2 = (Int16)(left.register.int16_2 * right.register.int16_2);
+                        product.register.int16_3 = (Int16)(left.register.int16_3 * right.register.int16_3);
+                        product.register.int16_4 = (Int16)(left.register.int16_4 * right.register.int16_4);
+                        product.register.int16_5 = (Int16)(left.register.int16_5 * right.register.int16_5);
+                        product.register.int16_6 = (Int16)(left.register.int16_6 * right.register.int16_6);
+                        product.register.int16_7 = (Int16)(left.register.int16_7 * right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        product.register.uint32_0 = (UInt32)(left.register.uint32_0 * right.register.uint32_0);
+                        product.register.uint32_1 = (UInt32)(left.register.uint32_1 * right.register.uint32_1);
+                        product.register.uint32_2 = (UInt32)(left.register.uint32_2 * right.register.uint32_2);
+                        product.register.uint32_3 = (UInt32)(left.register.uint32_3 * right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        product.register.int32_0 = (Int32)(left.register.int32_0 * right.register.int32_0);
+                        product.register.int32_1 = (Int32)(left.register.int32_1 * right.register.int32_1);
+                        product.register.int32_2 = (Int32)(left.register.int32_2 * right.register.int32_2);
+                        product.register.int32_3 = (Int32)(left.register.int32_3 * right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        product.register.uint64_0 = (UInt64)(left.register.uint64_0 * right.register.uint64_0);
+                        product.register.uint64_1 = (UInt64)(left.register.uint64_1 * right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        product.register.int64_0 = (Int64)(left.register.int64_0 * right.register.int64_0);
+                        product.register.int64_1 = (Int64)(left.register.int64_1 * right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        product.register.single_0 = (Single)(left.register.single_0 * right.register.single_0);
+                        product.register.single_1 = (Single)(left.register.single_1 * right.register.single_1);
+                        product.register.single_2 = (Single)(left.register.single_2 * right.register.single_2);
+                        product.register.single_3 = (Single)(left.register.single_3 * right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        product.register.double_0 = (Double)(left.register.double_0 * right.register.double_0);
+                        product.register.double_1 = (Double)(left.register.double_1 * right.register.double_1);
+                    }
+                    return product;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Multiplies a vector by the given scalar.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <param name="factor">The scalar value.</param>
+        /// <returns>The scaled vector.</returns>
+        public static Vector<T> operator *(Vector<T> value, T factor)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    return new Vector<T>(factor) * value;
+                }
+                else
+                {
+                    Vector<T> product = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        product.register.byte_0 = (Byte)(value.register.byte_0 * (Byte)(object)factor);
+                        product.register.byte_1 = (Byte)(value.register.byte_1 * (Byte)(object)factor);
+                        product.register.byte_2 = (Byte)(value.register.byte_2 * (Byte)(object)factor);
+                        product.register.byte_3 = (Byte)(value.register.byte_3 * (Byte)(object)factor);
+                        product.register.byte_4 = (Byte)(value.register.byte_4 * (Byte)(object)factor);
+                        product.register.byte_5 = (Byte)(value.register.byte_5 * (Byte)(object)factor);
+                        product.register.byte_6 = (Byte)(value.register.byte_6 * (Byte)(object)factor);
+                        product.register.byte_7 = (Byte)(value.register.byte_7 * (Byte)(object)factor);
+                        product.register.byte_8 = (Byte)(value.register.byte_8 * (Byte)(object)factor);
+                        product.register.byte_9 = (Byte)(value.register.byte_9 * (Byte)(object)factor);
+                        product.register.byte_10 = (Byte)(value.register.byte_10 * (Byte)(object)factor);
+                        product.register.byte_11 = (Byte)(value.register.byte_11 * (Byte)(object)factor);
+                        product.register.byte_12 = (Byte)(value.register.byte_12 * (Byte)(object)factor);
+                        product.register.byte_13 = (Byte)(value.register.byte_13 * (Byte)(object)factor);
+                        product.register.byte_14 = (Byte)(value.register.byte_14 * (Byte)(object)factor);
+                        product.register.byte_15 = (Byte)(value.register.byte_15 * (Byte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        product.register.sbyte_0 = (SByte)(value.register.sbyte_0 * (SByte)(object)factor);
+                        product.register.sbyte_1 = (SByte)(value.register.sbyte_1 * (SByte)(object)factor);
+                        product.register.sbyte_2 = (SByte)(value.register.sbyte_2 * (SByte)(object)factor);
+                        product.register.sbyte_3 = (SByte)(value.register.sbyte_3 * (SByte)(object)factor);
+                        product.register.sbyte_4 = (SByte)(value.register.sbyte_4 * (SByte)(object)factor);
+                        product.register.sbyte_5 = (SByte)(value.register.sbyte_5 * (SByte)(object)factor);
+                        product.register.sbyte_6 = (SByte)(value.register.sbyte_6 * (SByte)(object)factor);
+                        product.register.sbyte_7 = (SByte)(value.register.sbyte_7 * (SByte)(object)factor);
+                        product.register.sbyte_8 = (SByte)(value.register.sbyte_8 * (SByte)(object)factor);
+                        product.register.sbyte_9 = (SByte)(value.register.sbyte_9 * (SByte)(object)factor);
+                        product.register.sbyte_10 = (SByte)(value.register.sbyte_10 * (SByte)(object)factor);
+                        product.register.sbyte_11 = (SByte)(value.register.sbyte_11 * (SByte)(object)factor);
+                        product.register.sbyte_12 = (SByte)(value.register.sbyte_12 * (SByte)(object)factor);
+                        product.register.sbyte_13 = (SByte)(value.register.sbyte_13 * (SByte)(object)factor);
+                        product.register.sbyte_14 = (SByte)(value.register.sbyte_14 * (SByte)(object)factor);
+                        product.register.sbyte_15 = (SByte)(value.register.sbyte_15 * (SByte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        product.register.uint16_0 = (UInt16)(value.register.uint16_0 * (UInt16)(object)factor);
+                        product.register.uint16_1 = (UInt16)(value.register.uint16_1 * (UInt16)(object)factor);
+                        product.register.uint16_2 = (UInt16)(value.register.uint16_2 * (UInt16)(object)factor);
+                        product.register.uint16_3 = (UInt16)(value.register.uint16_3 * (UInt16)(object)factor);
+                        product.register.uint16_4 = (UInt16)(value.register.uint16_4 * (UInt16)(object)factor);
+                        product.register.uint16_5 = (UInt16)(value.register.uint16_5 * (UInt16)(object)factor);
+                        product.register.uint16_6 = (UInt16)(value.register.uint16_6 * (UInt16)(object)factor);
+                        product.register.uint16_7 = (UInt16)(value.register.uint16_7 * (UInt16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        product.register.int16_0 = (Int16)(value.register.int16_0 * (Int16)(object)factor);
+                        product.register.int16_1 = (Int16)(value.register.int16_1 * (Int16)(object)factor);
+                        product.register.int16_2 = (Int16)(value.register.int16_2 * (Int16)(object)factor);
+                        product.register.int16_3 = (Int16)(value.register.int16_3 * (Int16)(object)factor);
+                        product.register.int16_4 = (Int16)(value.register.int16_4 * (Int16)(object)factor);
+                        product.register.int16_5 = (Int16)(value.register.int16_5 * (Int16)(object)factor);
+                        product.register.int16_6 = (Int16)(value.register.int16_6 * (Int16)(object)factor);
+                        product.register.int16_7 = (Int16)(value.register.int16_7 * (Int16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        product.register.uint32_0 = (UInt32)(value.register.uint32_0 * (UInt32)(object)factor);
+                        product.register.uint32_1 = (UInt32)(value.register.uint32_1 * (UInt32)(object)factor);
+                        product.register.uint32_2 = (UInt32)(value.register.uint32_2 * (UInt32)(object)factor);
+                        product.register.uint32_3 = (UInt32)(value.register.uint32_3 * (UInt32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        product.register.int32_0 = (Int32)(value.register.int32_0 * (Int32)(object)factor);
+                        product.register.int32_1 = (Int32)(value.register.int32_1 * (Int32)(object)factor);
+                        product.register.int32_2 = (Int32)(value.register.int32_2 * (Int32)(object)factor);
+                        product.register.int32_3 = (Int32)(value.register.int32_3 * (Int32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        product.register.uint64_0 = (UInt64)(value.register.uint64_0 * (UInt64)(object)factor);
+                        product.register.uint64_1 = (UInt64)(value.register.uint64_1 * (UInt64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        product.register.int64_0 = (Int64)(value.register.int64_0 * (Int64)(object)factor);
+                        product.register.int64_1 = (Int64)(value.register.int64_1 * (Int64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        product.register.single_0 = (Single)(value.register.single_0 * (Single)(object)factor);
+                        product.register.single_1 = (Single)(value.register.single_1 * (Single)(object)factor);
+                        product.register.single_2 = (Single)(value.register.single_2 * (Single)(object)factor);
+                        product.register.single_3 = (Single)(value.register.single_3 * (Single)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        product.register.double_0 = (Double)(value.register.double_0 * (Double)(object)factor);
+                        product.register.double_1 = (Double)(value.register.double_1 * (Double)(object)factor);
+                    }
+                    return product;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Multiplies a vector by the given scalar.
+        /// </summary>
+        /// <param name="factor">The scalar value.</param>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The scaled vector.</returns>
+        public static Vector<T> operator *(T factor, Vector<T> value)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    return new Vector<T>(factor) * value;
+                }
+                else
+                {
+                    Vector<T> product = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        product.register.byte_0 = (Byte)(value.register.byte_0 * (Byte)(object)factor);
+                        product.register.byte_1 = (Byte)(value.register.byte_1 * (Byte)(object)factor);
+                        product.register.byte_2 = (Byte)(value.register.byte_2 * (Byte)(object)factor);
+                        product.register.byte_3 = (Byte)(value.register.byte_3 * (Byte)(object)factor);
+                        product.register.byte_4 = (Byte)(value.register.byte_4 * (Byte)(object)factor);
+                        product.register.byte_5 = (Byte)(value.register.byte_5 * (Byte)(object)factor);
+                        product.register.byte_6 = (Byte)(value.register.byte_6 * (Byte)(object)factor);
+                        product.register.byte_7 = (Byte)(value.register.byte_7 * (Byte)(object)factor);
+                        product.register.byte_8 = (Byte)(value.register.byte_8 * (Byte)(object)factor);
+                        product.register.byte_9 = (Byte)(value.register.byte_9 * (Byte)(object)factor);
+                        product.register.byte_10 = (Byte)(value.register.byte_10 * (Byte)(object)factor);
+                        product.register.byte_11 = (Byte)(value.register.byte_11 * (Byte)(object)factor);
+                        product.register.byte_12 = (Byte)(value.register.byte_12 * (Byte)(object)factor);
+                        product.register.byte_13 = (Byte)(value.register.byte_13 * (Byte)(object)factor);
+                        product.register.byte_14 = (Byte)(value.register.byte_14 * (Byte)(object)factor);
+                        product.register.byte_15 = (Byte)(value.register.byte_15 * (Byte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        product.register.sbyte_0 = (SByte)(value.register.sbyte_0 * (SByte)(object)factor);
+                        product.register.sbyte_1 = (SByte)(value.register.sbyte_1 * (SByte)(object)factor);
+                        product.register.sbyte_2 = (SByte)(value.register.sbyte_2 * (SByte)(object)factor);
+                        product.register.sbyte_3 = (SByte)(value.register.sbyte_3 * (SByte)(object)factor);
+                        product.register.sbyte_4 = (SByte)(value.register.sbyte_4 * (SByte)(object)factor);
+                        product.register.sbyte_5 = (SByte)(value.register.sbyte_5 * (SByte)(object)factor);
+                        product.register.sbyte_6 = (SByte)(value.register.sbyte_6 * (SByte)(object)factor);
+                        product.register.sbyte_7 = (SByte)(value.register.sbyte_7 * (SByte)(object)factor);
+                        product.register.sbyte_8 = (SByte)(value.register.sbyte_8 * (SByte)(object)factor);
+                        product.register.sbyte_9 = (SByte)(value.register.sbyte_9 * (SByte)(object)factor);
+                        product.register.sbyte_10 = (SByte)(value.register.sbyte_10 * (SByte)(object)factor);
+                        product.register.sbyte_11 = (SByte)(value.register.sbyte_11 * (SByte)(object)factor);
+                        product.register.sbyte_12 = (SByte)(value.register.sbyte_12 * (SByte)(object)factor);
+                        product.register.sbyte_13 = (SByte)(value.register.sbyte_13 * (SByte)(object)factor);
+                        product.register.sbyte_14 = (SByte)(value.register.sbyte_14 * (SByte)(object)factor);
+                        product.register.sbyte_15 = (SByte)(value.register.sbyte_15 * (SByte)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        product.register.uint16_0 = (UInt16)(value.register.uint16_0 * (UInt16)(object)factor);
+                        product.register.uint16_1 = (UInt16)(value.register.uint16_1 * (UInt16)(object)factor);
+                        product.register.uint16_2 = (UInt16)(value.register.uint16_2 * (UInt16)(object)factor);
+                        product.register.uint16_3 = (UInt16)(value.register.uint16_3 * (UInt16)(object)factor);
+                        product.register.uint16_4 = (UInt16)(value.register.uint16_4 * (UInt16)(object)factor);
+                        product.register.uint16_5 = (UInt16)(value.register.uint16_5 * (UInt16)(object)factor);
+                        product.register.uint16_6 = (UInt16)(value.register.uint16_6 * (UInt16)(object)factor);
+                        product.register.uint16_7 = (UInt16)(value.register.uint16_7 * (UInt16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        product.register.int16_0 = (Int16)(value.register.int16_0 * (Int16)(object)factor);
+                        product.register.int16_1 = (Int16)(value.register.int16_1 * (Int16)(object)factor);
+                        product.register.int16_2 = (Int16)(value.register.int16_2 * (Int16)(object)factor);
+                        product.register.int16_3 = (Int16)(value.register.int16_3 * (Int16)(object)factor);
+                        product.register.int16_4 = (Int16)(value.register.int16_4 * (Int16)(object)factor);
+                        product.register.int16_5 = (Int16)(value.register.int16_5 * (Int16)(object)factor);
+                        product.register.int16_6 = (Int16)(value.register.int16_6 * (Int16)(object)factor);
+                        product.register.int16_7 = (Int16)(value.register.int16_7 * (Int16)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        product.register.uint32_0 = (UInt32)(value.register.uint32_0 * (UInt32)(object)factor);
+                        product.register.uint32_1 = (UInt32)(value.register.uint32_1 * (UInt32)(object)factor);
+                        product.register.uint32_2 = (UInt32)(value.register.uint32_2 * (UInt32)(object)factor);
+                        product.register.uint32_3 = (UInt32)(value.register.uint32_3 * (UInt32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        product.register.int32_0 = (Int32)(value.register.int32_0 * (Int32)(object)factor);
+                        product.register.int32_1 = (Int32)(value.register.int32_1 * (Int32)(object)factor);
+                        product.register.int32_2 = (Int32)(value.register.int32_2 * (Int32)(object)factor);
+                        product.register.int32_3 = (Int32)(value.register.int32_3 * (Int32)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        product.register.uint64_0 = (UInt64)(value.register.uint64_0 * (UInt64)(object)factor);
+                        product.register.uint64_1 = (UInt64)(value.register.uint64_1 * (UInt64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        product.register.int64_0 = (Int64)(value.register.int64_0 * (Int64)(object)factor);
+                        product.register.int64_1 = (Int64)(value.register.int64_1 * (Int64)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        product.register.single_0 = (Single)(value.register.single_0 * (Single)(object)factor);
+                        product.register.single_1 = (Single)(value.register.single_1 * (Single)(object)factor);
+                        product.register.single_2 = (Single)(value.register.single_2 * (Single)(object)factor);
+                        product.register.single_3 = (Single)(value.register.single_3 * (Single)(object)factor);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        product.register.double_0 = (Double)(value.register.double_0 * (Double)(object)factor);
+                        product.register.double_1 = (Double)(value.register.double_1 * (Double)(object)factor);
+                    }
+                    return product;
+                }
+            }
+        }
+
+        // This method is intrinsic only for certain types. It cannot access fields directly unless we are sure the context is unaccelerated.
+        /// <summary>
+        /// Divides the first vector by the second.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The vector resulting from the division.</returns>
+        public static unsafe Vector<T> operator /(Vector<T> left, Vector<T> right)
+        {
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        Byte* dataPtr = stackalloc Byte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Byte)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        SByte* dataPtr = stackalloc SByte[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (SByte)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        UInt16* dataPtr = stackalloc UInt16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt16)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        Int16* dataPtr = stackalloc Int16[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int16)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        UInt32* dataPtr = stackalloc UInt32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt32)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        Int32* dataPtr = stackalloc Int32[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int32)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        UInt64* dataPtr = stackalloc UInt64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (UInt64)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        Int64* dataPtr = stackalloc Int64[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Int64)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        Single* dataPtr = stackalloc Single[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Single)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        Double* dataPtr = stackalloc Double[Count];
+                        for (int g = 0; g < Count; g++)
+                        {
+                            dataPtr[g] = (Double)(object)ScalarDivide(left[g], right[g]);
+                        }
+                        return new Vector<T>(dataPtr);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                    }
+                }
+                else
+                {
+                    Vector<T> quotient = new Vector<T>();
+                    if (typeof(T) == typeof(Byte))
+                    {
+                        quotient.register.byte_0 = (Byte)(left.register.byte_0 / right.register.byte_0);
+                        quotient.register.byte_1 = (Byte)(left.register.byte_1 / right.register.byte_1);
+                        quotient.register.byte_2 = (Byte)(left.register.byte_2 / right.register.byte_2);
+                        quotient.register.byte_3 = (Byte)(left.register.byte_3 / right.register.byte_3);
+                        quotient.register.byte_4 = (Byte)(left.register.byte_4 / right.register.byte_4);
+                        quotient.register.byte_5 = (Byte)(left.register.byte_5 / right.register.byte_5);
+                        quotient.register.byte_6 = (Byte)(left.register.byte_6 / right.register.byte_6);
+                        quotient.register.byte_7 = (Byte)(left.register.byte_7 / right.register.byte_7);
+                        quotient.register.byte_8 = (Byte)(left.register.byte_8 / right.register.byte_8);
+                        quotient.register.byte_9 = (Byte)(left.register.byte_9 / right.register.byte_9);
+                        quotient.register.byte_10 = (Byte)(left.register.byte_10 / right.register.byte_10);
+                        quotient.register.byte_11 = (Byte)(left.register.byte_11 / right.register.byte_11);
+                        quotient.register.byte_12 = (Byte)(left.register.byte_12 / right.register.byte_12);
+                        quotient.register.byte_13 = (Byte)(left.register.byte_13 / right.register.byte_13);
+                        quotient.register.byte_14 = (Byte)(left.register.byte_14 / right.register.byte_14);
+                        quotient.register.byte_15 = (Byte)(left.register.byte_15 / right.register.byte_15);
+                    }
+                    else if (typeof(T) == typeof(SByte))
+                    {
+                        quotient.register.sbyte_0 = (SByte)(left.register.sbyte_0 / right.register.sbyte_0);
+                        quotient.register.sbyte_1 = (SByte)(left.register.sbyte_1 / right.register.sbyte_1);
+                        quotient.register.sbyte_2 = (SByte)(left.register.sbyte_2 / right.register.sbyte_2);
+                        quotient.register.sbyte_3 = (SByte)(left.register.sbyte_3 / right.register.sbyte_3);
+                        quotient.register.sbyte_4 = (SByte)(left.register.sbyte_4 / right.register.sbyte_4);
+                        quotient.register.sbyte_5 = (SByte)(left.register.sbyte_5 / right.register.sbyte_5);
+                        quotient.register.sbyte_6 = (SByte)(left.register.sbyte_6 / right.register.sbyte_6);
+                        quotient.register.sbyte_7 = (SByte)(left.register.sbyte_7 / right.register.sbyte_7);
+                        quotient.register.sbyte_8 = (SByte)(left.register.sbyte_8 / right.register.sbyte_8);
+                        quotient.register.sbyte_9 = (SByte)(left.register.sbyte_9 / right.register.sbyte_9);
+                        quotient.register.sbyte_10 = (SByte)(left.register.sbyte_10 / right.register.sbyte_10);
+                        quotient.register.sbyte_11 = (SByte)(left.register.sbyte_11 / right.register.sbyte_11);
+                        quotient.register.sbyte_12 = (SByte)(left.register.sbyte_12 / right.register.sbyte_12);
+                        quotient.register.sbyte_13 = (SByte)(left.register.sbyte_13 / right.register.sbyte_13);
+                        quotient.register.sbyte_14 = (SByte)(left.register.sbyte_14 / right.register.sbyte_14);
+                        quotient.register.sbyte_15 = (SByte)(left.register.sbyte_15 / right.register.sbyte_15);
+                    }
+                    else if (typeof(T) == typeof(UInt16))
+                    {
+                        quotient.register.uint16_0 = (UInt16)(left.register.uint16_0 / right.register.uint16_0);
+                        quotient.register.uint16_1 = (UInt16)(left.register.uint16_1 / right.register.uint16_1);
+                        quotient.register.uint16_2 = (UInt16)(left.register.uint16_2 / right.register.uint16_2);
+                        quotient.register.uint16_3 = (UInt16)(left.register.uint16_3 / right.register.uint16_3);
+                        quotient.register.uint16_4 = (UInt16)(left.register.uint16_4 / right.register.uint16_4);
+                        quotient.register.uint16_5 = (UInt16)(left.register.uint16_5 / right.register.uint16_5);
+                        quotient.register.uint16_6 = (UInt16)(left.register.uint16_6 / right.register.uint16_6);
+                        quotient.register.uint16_7 = (UInt16)(left.register.uint16_7 / right.register.uint16_7);
+                    }
+                    else if (typeof(T) == typeof(Int16))
+                    {
+                        quotient.register.int16_0 = (Int16)(left.register.int16_0 / right.register.int16_0);
+                        quotient.register.int16_1 = (Int16)(left.register.int16_1 / right.register.int16_1);
+                        quotient.register.int16_2 = (Int16)(left.register.int16_2 / right.register.int16_2);
+                        quotient.register.int16_3 = (Int16)(left.register.int16_3 / right.register.int16_3);
+                        quotient.register.int16_4 = (Int16)(left.register.int16_4 / right.register.int16_4);
+                        quotient.register.int16_5 = (Int16)(left.register.int16_5 / right.register.int16_5);
+                        quotient.register.int16_6 = (Int16)(left.register.int16_6 / right.register.int16_6);
+                        quotient.register.int16_7 = (Int16)(left.register.int16_7 / right.register.int16_7);
+                    }
+                    else if (typeof(T) == typeof(UInt32))
+                    {
+                        quotient.register.uint32_0 = (UInt32)(left.register.uint32_0 / right.register.uint32_0);
+                        quotient.register.uint32_1 = (UInt32)(left.register.uint32_1 / right.register.uint32_1);
+                        quotient.register.uint32_2 = (UInt32)(left.register.uint32_2 / right.register.uint32_2);
+                        quotient.register.uint32_3 = (UInt32)(left.register.uint32_3 / right.register.uint32_3);
+                    }
+                    else if (typeof(T) == typeof(Int32))
+                    {
+                        quotient.register.int32_0 = (Int32)(left.register.int32_0 / right.register.int32_0);
+                        quotient.register.int32_1 = (Int32)(left.register.int32_1 / right.register.int32_1);
+                        quotient.register.int32_2 = (Int32)(left.register.int32_2 / right.register.int32_2);
+                        quotient.register.int32_3 = (Int32)(left.register.int32_3 / right.register.int32_3);
+                    }
+                    else if (typeof(T) == typeof(UInt64))
+                    {
+                        quotient.register.uint64_0 = (UInt64)(left.register.uint64_0 / right.register.uint64_0);
+                        quotient.register.uint64_1 = (UInt64)(left.register.uint64_1 / right.register.uint64_1);
+                    }
+                    else if (typeof(T) == typeof(Int64))
+                    {
+                        quotient.register.int64_0 = (Int64)(left.register.int64_0 / right.register.int64_0);
+                        quotient.register.int64_1 = (Int64)(left.register.int64_1 / right.register.int64_1);
+                    }
+                    else if (typeof(T) == typeof(Single))
+                    {
+                        quotient.register.single_0 = (Single)(left.register.single_0 / right.register.single_0);
+                        quotient.register.single_1 = (Single)(left.register.single_1 / right.register.single_1);
+                        quotient.register.single_2 = (Single)(left.register.single_2 / right.register.single_2);
+                        quotient.register.single_3 = (Single)(left.register.single_3 / right.register.single_3);
+                    }
+                    else if (typeof(T) == typeof(Double))
+                    {
+                        quotient.register.double_0 = (Double)(left.register.double_0 / right.register.double_0);
+                        quotient.register.double_1 = (Double)(left.register.double_1 / right.register.double_1);
+                    }
+                    return quotient;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Negates a given vector.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The negated vector.</returns>
+        public static Vector<T> operator -(Vector<T> value)
+        {
+            return Zero - value;
+        }
+        #endregion Arithmetic Operators
+
+        #region Bitwise Operators
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-and operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [JitIntrinsic]
+        public static unsafe Vector<T> operator &(Vector<T> left, Vector<T> right)
+        {
+            Vector<T> result = new Vector<T>();
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    Int64* resultBase = &result.register.int64_0;
+                    Int64* leftBase = &left.register.int64_0;
+                    Int64* rightBase = &right.register.int64_0;
+                    for (int g = 0; g < Vector<Int64>.Count; g++)
+                    {
+                        resultBase[g] = leftBase[g] & rightBase[g];
+                    }
+                }
+                else
+                {
+                    result.register.int64_0 = left.register.int64_0 & right.register.int64_0;
+                    result.register.int64_1 = left.register.int64_1 & right.register.int64_1;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [JitIntrinsic]
+        public static unsafe Vector<T> operator |(Vector<T> left, Vector<T> right)
+        {
+            Vector<T> result = new Vector<T>();
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    Int64* resultBase = &result.register.int64_0;
+                    Int64* leftBase = &left.register.int64_0;
+                    Int64* rightBase = &right.register.int64_0;
+                    for (int g = 0; g < Vector<Int64>.Count; g++)
+                    {
+                        resultBase[g] = leftBase[g] | rightBase[g];
+                    }
+                }
+                else
+                {
+                    result.register.int64_0 = left.register.int64_0 | right.register.int64_0;
+                    result.register.int64_1 = left.register.int64_1 | right.register.int64_1;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-exclusive-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [JitIntrinsic]
+        public static unsafe Vector<T> operator ^(Vector<T> left, Vector<T> right)
+        {
+            Vector<T> result = new Vector<T>();
+            unchecked
+            {
+                if (Vector.IsHardwareAccelerated)
+                {
+                    Int64* resultBase = &result.register.int64_0;
+                    Int64* leftBase = &left.register.int64_0;
+                    Int64* rightBase = &right.register.int64_0;
+                    for (int g = 0; g < Vector<Int64>.Count; g++)
+                    {
+                        resultBase[g] = leftBase[g] ^ rightBase[g];
+                    }
+                }
+                else
+                {
+                    result.register.int64_0 = left.register.int64_0 ^ right.register.int64_0;
+                    result.register.int64_1 = left.register.int64_1 ^ right.register.int64_1;
+                }
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are obtained by taking the one's complement of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The one's complement vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> operator ~(Vector<T> value)
+        {
+            return allOnes ^ value;
+        }
+        #endregion Bitwise Operators
+
+        #region Logical Operators
+        /// <summary>
+        /// Returns a boolean indicating whether each pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The first vector to compare.</param>
+        /// <returns>True if all elements are equal; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool operator ==(Vector<T> left, Vector<T> right)
+        {
+            return left.Equals(right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any single pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any element pairs are equal; False if no element pairs are equal.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool operator !=(Vector<T> left, Vector<T> right)
+        {
+            return !(left == right);
+        }
+        #endregion Logical Operators
+
+        #region Conversions
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Byte>(Vector<T> value)
+        {
+            return new Vector<Byte>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<SByte>(Vector<T> value)
+        {
+            return new Vector<SByte>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<UInt16>(Vector<T> value)
+        {
+            return new Vector<UInt16>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Int16>(Vector<T> value)
+        {
+            return new Vector<Int16>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<UInt32>(Vector<T> value)
+        {
+            return new Vector<UInt32>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Int32>(Vector<T> value)
+        {
+            return new Vector<Int32>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [JitIntrinsic]
+        public static explicit operator Vector<UInt64>(Vector<T> value)
+        {
+            return new Vector<UInt64>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Int64>(Vector<T> value)
+        {
+            return new Vector<Int64>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Single>(Vector<T> value)
+        {
+            return new Vector<Single>(ref value.register);
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of another type.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [JitIntrinsic]
+        public static explicit operator Vector<Double>(Vector<T> value)
+        {
+            return new Vector<Double>(ref value.register);
+        }
+
+        #endregion Conversions
+
+        #region Internal Comparison Methods
+        [JitIntrinsic]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        internal static unsafe Vector<T> Equals(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarEquals(left[g], right[g]) ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Register register = new Register();
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = left.register.byte_0 == right.register.byte_0 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_1 = left.register.byte_1 == right.register.byte_1 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_2 = left.register.byte_2 == right.register.byte_2 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_3 = left.register.byte_3 == right.register.byte_3 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_4 = left.register.byte_4 == right.register.byte_4 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_5 = left.register.byte_5 == right.register.byte_5 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_6 = left.register.byte_6 == right.register.byte_6 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_7 = left.register.byte_7 == right.register.byte_7 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_8 = left.register.byte_8 == right.register.byte_8 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_9 = left.register.byte_9 == right.register.byte_9 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_10 = left.register.byte_10 == right.register.byte_10 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_11 = left.register.byte_11 == right.register.byte_11 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_12 = left.register.byte_12 == right.register.byte_12 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_13 = left.register.byte_13 == right.register.byte_13 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_14 = left.register.byte_14 == right.register.byte_14 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_15 = left.register.byte_15 == right.register.byte_15 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = left.register.sbyte_0 == right.register.sbyte_0 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_1 = left.register.sbyte_1 == right.register.sbyte_1 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_2 = left.register.sbyte_2 == right.register.sbyte_2 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_3 = left.register.sbyte_3 == right.register.sbyte_3 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_4 = left.register.sbyte_4 == right.register.sbyte_4 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_5 = left.register.sbyte_5 == right.register.sbyte_5 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_6 = left.register.sbyte_6 == right.register.sbyte_6 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_7 = left.register.sbyte_7 == right.register.sbyte_7 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_8 = left.register.sbyte_8 == right.register.sbyte_8 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_9 = left.register.sbyte_9 == right.register.sbyte_9 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_10 = left.register.sbyte_10 == right.register.sbyte_10 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_11 = left.register.sbyte_11 == right.register.sbyte_11 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_12 = left.register.sbyte_12 == right.register.sbyte_12 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_13 = left.register.sbyte_13 == right.register.sbyte_13 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_14 = left.register.sbyte_14 == right.register.sbyte_14 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_15 = left.register.sbyte_15 == right.register.sbyte_15 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = left.register.uint16_0 == right.register.uint16_0 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_1 = left.register.uint16_1 == right.register.uint16_1 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_2 = left.register.uint16_2 == right.register.uint16_2 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_3 = left.register.uint16_3 == right.register.uint16_3 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_4 = left.register.uint16_4 == right.register.uint16_4 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_5 = left.register.uint16_5 == right.register.uint16_5 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_6 = left.register.uint16_6 == right.register.uint16_6 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_7 = left.register.uint16_7 == right.register.uint16_7 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = left.register.int16_0 == right.register.int16_0 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_1 = left.register.int16_1 == right.register.int16_1 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_2 = left.register.int16_2 == right.register.int16_2 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_3 = left.register.int16_3 == right.register.int16_3 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_4 = left.register.int16_4 == right.register.int16_4 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_5 = left.register.int16_5 == right.register.int16_5 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_6 = left.register.int16_6 == right.register.int16_6 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_7 = left.register.int16_7 == right.register.int16_7 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = left.register.uint32_0 == right.register.uint32_0 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_1 = left.register.uint32_1 == right.register.uint32_1 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_2 = left.register.uint32_2 == right.register.uint32_2 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_3 = left.register.uint32_3 == right.register.uint32_3 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = left.register.int32_0 == right.register.int32_0 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_1 = left.register.int32_1 == right.register.int32_1 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_2 = left.register.int32_2 == right.register.int32_2 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_3 = left.register.int32_3 == right.register.int32_3 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = left.register.uint64_0 == right.register.uint64_0 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    register.uint64_1 = left.register.uint64_1 == right.register.uint64_1 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = left.register.int64_0 == right.register.int64_0 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    register.int64_1 = left.register.int64_1 == right.register.int64_1 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = left.register.single_0 == right.register.single_0 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_1 = left.register.single_1 == right.register.single_1 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_2 = left.register.single_2 == right.register.single_2 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_3 = left.register.single_3 == right.register.single_3 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = left.register.double_0 == right.register.double_0 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    register.double_1 = left.register.double_1 == right.register.double_1 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    return new Vector<T>(ref register);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        internal static unsafe Vector<T> LessThan(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Register register = new Register();
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = left.register.byte_0 < right.register.byte_0 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_1 = left.register.byte_1 < right.register.byte_1 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_2 = left.register.byte_2 < right.register.byte_2 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_3 = left.register.byte_3 < right.register.byte_3 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_4 = left.register.byte_4 < right.register.byte_4 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_5 = left.register.byte_5 < right.register.byte_5 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_6 = left.register.byte_6 < right.register.byte_6 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_7 = left.register.byte_7 < right.register.byte_7 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_8 = left.register.byte_8 < right.register.byte_8 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_9 = left.register.byte_9 < right.register.byte_9 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_10 = left.register.byte_10 < right.register.byte_10 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_11 = left.register.byte_11 < right.register.byte_11 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_12 = left.register.byte_12 < right.register.byte_12 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_13 = left.register.byte_13 < right.register.byte_13 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_14 = left.register.byte_14 < right.register.byte_14 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_15 = left.register.byte_15 < right.register.byte_15 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = left.register.sbyte_0 < right.register.sbyte_0 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_1 = left.register.sbyte_1 < right.register.sbyte_1 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_2 = left.register.sbyte_2 < right.register.sbyte_2 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_3 = left.register.sbyte_3 < right.register.sbyte_3 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_4 = left.register.sbyte_4 < right.register.sbyte_4 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_5 = left.register.sbyte_5 < right.register.sbyte_5 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_6 = left.register.sbyte_6 < right.register.sbyte_6 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_7 = left.register.sbyte_7 < right.register.sbyte_7 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_8 = left.register.sbyte_8 < right.register.sbyte_8 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_9 = left.register.sbyte_9 < right.register.sbyte_9 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_10 = left.register.sbyte_10 < right.register.sbyte_10 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_11 = left.register.sbyte_11 < right.register.sbyte_11 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_12 = left.register.sbyte_12 < right.register.sbyte_12 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_13 = left.register.sbyte_13 < right.register.sbyte_13 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_14 = left.register.sbyte_14 < right.register.sbyte_14 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_15 = left.register.sbyte_15 < right.register.sbyte_15 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = left.register.uint16_0 < right.register.uint16_0 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_1 = left.register.uint16_1 < right.register.uint16_1 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_2 = left.register.uint16_2 < right.register.uint16_2 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_3 = left.register.uint16_3 < right.register.uint16_3 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_4 = left.register.uint16_4 < right.register.uint16_4 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_5 = left.register.uint16_5 < right.register.uint16_5 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_6 = left.register.uint16_6 < right.register.uint16_6 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_7 = left.register.uint16_7 < right.register.uint16_7 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = left.register.int16_0 < right.register.int16_0 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_1 = left.register.int16_1 < right.register.int16_1 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_2 = left.register.int16_2 < right.register.int16_2 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_3 = left.register.int16_3 < right.register.int16_3 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_4 = left.register.int16_4 < right.register.int16_4 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_5 = left.register.int16_5 < right.register.int16_5 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_6 = left.register.int16_6 < right.register.int16_6 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_7 = left.register.int16_7 < right.register.int16_7 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = left.register.uint32_0 < right.register.uint32_0 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_1 = left.register.uint32_1 < right.register.uint32_1 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_2 = left.register.uint32_2 < right.register.uint32_2 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_3 = left.register.uint32_3 < right.register.uint32_3 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = left.register.int32_0 < right.register.int32_0 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_1 = left.register.int32_1 < right.register.int32_1 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_2 = left.register.int32_2 < right.register.int32_2 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_3 = left.register.int32_3 < right.register.int32_3 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = left.register.uint64_0 < right.register.uint64_0 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    register.uint64_1 = left.register.uint64_1 < right.register.uint64_1 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = left.register.int64_0 < right.register.int64_0 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    register.int64_1 = left.register.int64_1 < right.register.int64_1 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = left.register.single_0 < right.register.single_0 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_1 = left.register.single_1 < right.register.single_1 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_2 = left.register.single_2 < right.register.single_2 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_3 = left.register.single_3 < right.register.single_3 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = left.register.double_0 < right.register.double_0 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    register.double_1 = left.register.double_1 < right.register.double_1 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    return new Vector<T>(ref register);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        internal static unsafe Vector<T> GreaterThan(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Register register = new Register();
+                if (typeof(T) == typeof(Byte))
+                {
+                    register.byte_0 = left.register.byte_0 > right.register.byte_0 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_1 = left.register.byte_1 > right.register.byte_1 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_2 = left.register.byte_2 > right.register.byte_2 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_3 = left.register.byte_3 > right.register.byte_3 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_4 = left.register.byte_4 > right.register.byte_4 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_5 = left.register.byte_5 > right.register.byte_5 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_6 = left.register.byte_6 > right.register.byte_6 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_7 = left.register.byte_7 > right.register.byte_7 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_8 = left.register.byte_8 > right.register.byte_8 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_9 = left.register.byte_9 > right.register.byte_9 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_10 = left.register.byte_10 > right.register.byte_10 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_11 = left.register.byte_11 > right.register.byte_11 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_12 = left.register.byte_12 > right.register.byte_12 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_13 = left.register.byte_13 > right.register.byte_13 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_14 = left.register.byte_14 > right.register.byte_14 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    register.byte_15 = left.register.byte_15 > right.register.byte_15 ? ConstantHelper.GetByteWithAllBitsSet() : (Byte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    register.sbyte_0 = left.register.sbyte_0 > right.register.sbyte_0 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_1 = left.register.sbyte_1 > right.register.sbyte_1 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_2 = left.register.sbyte_2 > right.register.sbyte_2 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_3 = left.register.sbyte_3 > right.register.sbyte_3 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_4 = left.register.sbyte_4 > right.register.sbyte_4 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_5 = left.register.sbyte_5 > right.register.sbyte_5 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_6 = left.register.sbyte_6 > right.register.sbyte_6 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_7 = left.register.sbyte_7 > right.register.sbyte_7 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_8 = left.register.sbyte_8 > right.register.sbyte_8 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_9 = left.register.sbyte_9 > right.register.sbyte_9 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_10 = left.register.sbyte_10 > right.register.sbyte_10 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_11 = left.register.sbyte_11 > right.register.sbyte_11 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_12 = left.register.sbyte_12 > right.register.sbyte_12 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_13 = left.register.sbyte_13 > right.register.sbyte_13 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_14 = left.register.sbyte_14 > right.register.sbyte_14 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    register.sbyte_15 = left.register.sbyte_15 > right.register.sbyte_15 ? ConstantHelper.GetSByteWithAllBitsSet() : (SByte)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    register.uint16_0 = left.register.uint16_0 > right.register.uint16_0 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_1 = left.register.uint16_1 > right.register.uint16_1 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_2 = left.register.uint16_2 > right.register.uint16_2 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_3 = left.register.uint16_3 > right.register.uint16_3 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_4 = left.register.uint16_4 > right.register.uint16_4 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_5 = left.register.uint16_5 > right.register.uint16_5 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_6 = left.register.uint16_6 > right.register.uint16_6 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    register.uint16_7 = left.register.uint16_7 > right.register.uint16_7 ? ConstantHelper.GetUInt16WithAllBitsSet() : (UInt16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    register.int16_0 = left.register.int16_0 > right.register.int16_0 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_1 = left.register.int16_1 > right.register.int16_1 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_2 = left.register.int16_2 > right.register.int16_2 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_3 = left.register.int16_3 > right.register.int16_3 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_4 = left.register.int16_4 > right.register.int16_4 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_5 = left.register.int16_5 > right.register.int16_5 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_6 = left.register.int16_6 > right.register.int16_6 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    register.int16_7 = left.register.int16_7 > right.register.int16_7 ? ConstantHelper.GetInt16WithAllBitsSet() : (Int16)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    register.uint32_0 = left.register.uint32_0 > right.register.uint32_0 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_1 = left.register.uint32_1 > right.register.uint32_1 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_2 = left.register.uint32_2 > right.register.uint32_2 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    register.uint32_3 = left.register.uint32_3 > right.register.uint32_3 ? ConstantHelper.GetUInt32WithAllBitsSet() : (UInt32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    register.int32_0 = left.register.int32_0 > right.register.int32_0 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_1 = left.register.int32_1 > right.register.int32_1 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_2 = left.register.int32_2 > right.register.int32_2 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    register.int32_3 = left.register.int32_3 > right.register.int32_3 ? ConstantHelper.GetInt32WithAllBitsSet() : (Int32)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    register.uint64_0 = left.register.uint64_0 > right.register.uint64_0 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    register.uint64_1 = left.register.uint64_1 > right.register.uint64_1 ? ConstantHelper.GetUInt64WithAllBitsSet() : (UInt64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    register.int64_0 = left.register.int64_0 > right.register.int64_0 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    register.int64_1 = left.register.int64_1 > right.register.int64_1 ? ConstantHelper.GetInt64WithAllBitsSet() : (Int64)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    register.single_0 = left.register.single_0 > right.register.single_0 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_1 = left.register.single_1 > right.register.single_1 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_2 = left.register.single_2 > right.register.single_2 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    register.single_3 = left.register.single_3 > right.register.single_3 ? ConstantHelper.GetSingleWithAllBitsSet() : (Single)0;
+                    return new Vector<T>(ref register);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    register.double_0 = left.register.double_0 > right.register.double_0 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    register.double_1 = left.register.double_1 > right.register.double_1 ? ConstantHelper.GetDoubleWithAllBitsSet() : (Double)0;
+                    return new Vector<T>(ref register);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static Vector<T> GreaterThanOrEqual(Vector<T> left, Vector<T> right)
+        {
+            return Equals(left, right) | GreaterThan(left, right);
+        }
+
+        [JitIntrinsic]
+        internal static Vector<T> LessThanOrEqual(Vector<T> left, Vector<T> right)
+        {
+            return Equals(left, right) | LessThan(left, right);
+        }
+
+        [JitIntrinsic]
+        internal static Vector<T> ConditionalSelect(Vector<T> condition, Vector<T> left, Vector<T> right)
+        {
+            return (left & condition) | (Vector.AndNot(right, condition));
+        }
+        #endregion Comparison Methods
+
+        #region Internal Math Methods
+        [JitIntrinsic]
+        internal static unsafe Vector<T> Abs(Vector<T> value)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return value;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return value;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return value;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return value;
+            }
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (SByte)(object)(Math.Abs((SByte)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int16)(object)(Math.Abs((Int16)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int32)(object)(Math.Abs((Int32)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int64)(object)(Math.Abs((Int64)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Single)(object)(Math.Abs((Single)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Double)(object)(Math.Abs((Double)(object)value[g]));
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(SByte))
+                {
+                    value.register.sbyte_0 = (SByte)(Math.Abs(value.register.sbyte_0));
+                    value.register.sbyte_1 = (SByte)(Math.Abs(value.register.sbyte_1));
+                    value.register.sbyte_2 = (SByte)(Math.Abs(value.register.sbyte_2));
+                    value.register.sbyte_3 = (SByte)(Math.Abs(value.register.sbyte_3));
+                    value.register.sbyte_4 = (SByte)(Math.Abs(value.register.sbyte_4));
+                    value.register.sbyte_5 = (SByte)(Math.Abs(value.register.sbyte_5));
+                    value.register.sbyte_6 = (SByte)(Math.Abs(value.register.sbyte_6));
+                    value.register.sbyte_7 = (SByte)(Math.Abs(value.register.sbyte_7));
+                    value.register.sbyte_8 = (SByte)(Math.Abs(value.register.sbyte_8));
+                    value.register.sbyte_9 = (SByte)(Math.Abs(value.register.sbyte_9));
+                    value.register.sbyte_10 = (SByte)(Math.Abs(value.register.sbyte_10));
+                    value.register.sbyte_11 = (SByte)(Math.Abs(value.register.sbyte_11));
+                    value.register.sbyte_12 = (SByte)(Math.Abs(value.register.sbyte_12));
+                    value.register.sbyte_13 = (SByte)(Math.Abs(value.register.sbyte_13));
+                    value.register.sbyte_14 = (SByte)(Math.Abs(value.register.sbyte_14));
+                    value.register.sbyte_15 = (SByte)(Math.Abs(value.register.sbyte_15));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    value.register.int16_0 = (Int16)(Math.Abs(value.register.int16_0));
+                    value.register.int16_1 = (Int16)(Math.Abs(value.register.int16_1));
+                    value.register.int16_2 = (Int16)(Math.Abs(value.register.int16_2));
+                    value.register.int16_3 = (Int16)(Math.Abs(value.register.int16_3));
+                    value.register.int16_4 = (Int16)(Math.Abs(value.register.int16_4));
+                    value.register.int16_5 = (Int16)(Math.Abs(value.register.int16_5));
+                    value.register.int16_6 = (Int16)(Math.Abs(value.register.int16_6));
+                    value.register.int16_7 = (Int16)(Math.Abs(value.register.int16_7));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    value.register.int32_0 = (Int32)(Math.Abs(value.register.int32_0));
+                    value.register.int32_1 = (Int32)(Math.Abs(value.register.int32_1));
+                    value.register.int32_2 = (Int32)(Math.Abs(value.register.int32_2));
+                    value.register.int32_3 = (Int32)(Math.Abs(value.register.int32_3));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    value.register.int64_0 = (Int64)(Math.Abs(value.register.int64_0));
+                    value.register.int64_1 = (Int64)(Math.Abs(value.register.int64_1));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    value.register.single_0 = (Single)(Math.Abs(value.register.single_0));
+                    value.register.single_1 = (Single)(Math.Abs(value.register.single_1));
+                    value.register.single_2 = (Single)(Math.Abs(value.register.single_2));
+                    value.register.single_3 = (Single)(Math.Abs(value.register.single_3));
+                    return value;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    value.register.double_0 = (Double)(Math.Abs(value.register.double_0));
+                    value.register.double_1 = (Double)(Math.Abs(value.register.double_1));
+                    return value;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static unsafe Vector<T> Min(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Byte)(object)left[g] : (Byte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (SByte)(object)left[g] : (SByte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (UInt16)(object)left[g] : (UInt16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Int16)(object)left[g] : (Int16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (UInt32)(object)left[g] : (UInt32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Int32)(object)left[g] : (Int32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (UInt64)(object)left[g] : (UInt64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Int64)(object)left[g] : (Int64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Single)(object)left[g] : (Single)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarLessThan(left[g], right[g]) ? (Double)(object)left[g] : (Double)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Vector<T> vec = new Vector<T>();
+                if (typeof(T) == typeof(Byte))
+                {
+                    vec.register.byte_0 = left.register.byte_0 < right.register.byte_0 ? left.register.byte_0 : right.register.byte_0;
+                    vec.register.byte_1 = left.register.byte_1 < right.register.byte_1 ? left.register.byte_1 : right.register.byte_1;
+                    vec.register.byte_2 = left.register.byte_2 < right.register.byte_2 ? left.register.byte_2 : right.register.byte_2;
+                    vec.register.byte_3 = left.register.byte_3 < right.register.byte_3 ? left.register.byte_3 : right.register.byte_3;
+                    vec.register.byte_4 = left.register.byte_4 < right.register.byte_4 ? left.register.byte_4 : right.register.byte_4;
+                    vec.register.byte_5 = left.register.byte_5 < right.register.byte_5 ? left.register.byte_5 : right.register.byte_5;
+                    vec.register.byte_6 = left.register.byte_6 < right.register.byte_6 ? left.register.byte_6 : right.register.byte_6;
+                    vec.register.byte_7 = left.register.byte_7 < right.register.byte_7 ? left.register.byte_7 : right.register.byte_7;
+                    vec.register.byte_8 = left.register.byte_8 < right.register.byte_8 ? left.register.byte_8 : right.register.byte_8;
+                    vec.register.byte_9 = left.register.byte_9 < right.register.byte_9 ? left.register.byte_9 : right.register.byte_9;
+                    vec.register.byte_10 = left.register.byte_10 < right.register.byte_10 ? left.register.byte_10 : right.register.byte_10;
+                    vec.register.byte_11 = left.register.byte_11 < right.register.byte_11 ? left.register.byte_11 : right.register.byte_11;
+                    vec.register.byte_12 = left.register.byte_12 < right.register.byte_12 ? left.register.byte_12 : right.register.byte_12;
+                    vec.register.byte_13 = left.register.byte_13 < right.register.byte_13 ? left.register.byte_13 : right.register.byte_13;
+                    vec.register.byte_14 = left.register.byte_14 < right.register.byte_14 ? left.register.byte_14 : right.register.byte_14;
+                    vec.register.byte_15 = left.register.byte_15 < right.register.byte_15 ? left.register.byte_15 : right.register.byte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    vec.register.sbyte_0 = left.register.sbyte_0 < right.register.sbyte_0 ? left.register.sbyte_0 : right.register.sbyte_0;
+                    vec.register.sbyte_1 = left.register.sbyte_1 < right.register.sbyte_1 ? left.register.sbyte_1 : right.register.sbyte_1;
+                    vec.register.sbyte_2 = left.register.sbyte_2 < right.register.sbyte_2 ? left.register.sbyte_2 : right.register.sbyte_2;
+                    vec.register.sbyte_3 = left.register.sbyte_3 < right.register.sbyte_3 ? left.register.sbyte_3 : right.register.sbyte_3;
+                    vec.register.sbyte_4 = left.register.sbyte_4 < right.register.sbyte_4 ? left.register.sbyte_4 : right.register.sbyte_4;
+                    vec.register.sbyte_5 = left.register.sbyte_5 < right.register.sbyte_5 ? left.register.sbyte_5 : right.register.sbyte_5;
+                    vec.register.sbyte_6 = left.register.sbyte_6 < right.register.sbyte_6 ? left.register.sbyte_6 : right.register.sbyte_6;
+                    vec.register.sbyte_7 = left.register.sbyte_7 < right.register.sbyte_7 ? left.register.sbyte_7 : right.register.sbyte_7;
+                    vec.register.sbyte_8 = left.register.sbyte_8 < right.register.sbyte_8 ? left.register.sbyte_8 : right.register.sbyte_8;
+                    vec.register.sbyte_9 = left.register.sbyte_9 < right.register.sbyte_9 ? left.register.sbyte_9 : right.register.sbyte_9;
+                    vec.register.sbyte_10 = left.register.sbyte_10 < right.register.sbyte_10 ? left.register.sbyte_10 : right.register.sbyte_10;
+                    vec.register.sbyte_11 = left.register.sbyte_11 < right.register.sbyte_11 ? left.register.sbyte_11 : right.register.sbyte_11;
+                    vec.register.sbyte_12 = left.register.sbyte_12 < right.register.sbyte_12 ? left.register.sbyte_12 : right.register.sbyte_12;
+                    vec.register.sbyte_13 = left.register.sbyte_13 < right.register.sbyte_13 ? left.register.sbyte_13 : right.register.sbyte_13;
+                    vec.register.sbyte_14 = left.register.sbyte_14 < right.register.sbyte_14 ? left.register.sbyte_14 : right.register.sbyte_14;
+                    vec.register.sbyte_15 = left.register.sbyte_15 < right.register.sbyte_15 ? left.register.sbyte_15 : right.register.sbyte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    vec.register.uint16_0 = left.register.uint16_0 < right.register.uint16_0 ? left.register.uint16_0 : right.register.uint16_0;
+                    vec.register.uint16_1 = left.register.uint16_1 < right.register.uint16_1 ? left.register.uint16_1 : right.register.uint16_1;
+                    vec.register.uint16_2 = left.register.uint16_2 < right.register.uint16_2 ? left.register.uint16_2 : right.register.uint16_2;
+                    vec.register.uint16_3 = left.register.uint16_3 < right.register.uint16_3 ? left.register.uint16_3 : right.register.uint16_3;
+                    vec.register.uint16_4 = left.register.uint16_4 < right.register.uint16_4 ? left.register.uint16_4 : right.register.uint16_4;
+                    vec.register.uint16_5 = left.register.uint16_5 < right.register.uint16_5 ? left.register.uint16_5 : right.register.uint16_5;
+                    vec.register.uint16_6 = left.register.uint16_6 < right.register.uint16_6 ? left.register.uint16_6 : right.register.uint16_6;
+                    vec.register.uint16_7 = left.register.uint16_7 < right.register.uint16_7 ? left.register.uint16_7 : right.register.uint16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    vec.register.int16_0 = left.register.int16_0 < right.register.int16_0 ? left.register.int16_0 : right.register.int16_0;
+                    vec.register.int16_1 = left.register.int16_1 < right.register.int16_1 ? left.register.int16_1 : right.register.int16_1;
+                    vec.register.int16_2 = left.register.int16_2 < right.register.int16_2 ? left.register.int16_2 : right.register.int16_2;
+                    vec.register.int16_3 = left.register.int16_3 < right.register.int16_3 ? left.register.int16_3 : right.register.int16_3;
+                    vec.register.int16_4 = left.register.int16_4 < right.register.int16_4 ? left.register.int16_4 : right.register.int16_4;
+                    vec.register.int16_5 = left.register.int16_5 < right.register.int16_5 ? left.register.int16_5 : right.register.int16_5;
+                    vec.register.int16_6 = left.register.int16_6 < right.register.int16_6 ? left.register.int16_6 : right.register.int16_6;
+                    vec.register.int16_7 = left.register.int16_7 < right.register.int16_7 ? left.register.int16_7 : right.register.int16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    vec.register.uint32_0 = left.register.uint32_0 < right.register.uint32_0 ? left.register.uint32_0 : right.register.uint32_0;
+                    vec.register.uint32_1 = left.register.uint32_1 < right.register.uint32_1 ? left.register.uint32_1 : right.register.uint32_1;
+                    vec.register.uint32_2 = left.register.uint32_2 < right.register.uint32_2 ? left.register.uint32_2 : right.register.uint32_2;
+                    vec.register.uint32_3 = left.register.uint32_3 < right.register.uint32_3 ? left.register.uint32_3 : right.register.uint32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    vec.register.int32_0 = left.register.int32_0 < right.register.int32_0 ? left.register.int32_0 : right.register.int32_0;
+                    vec.register.int32_1 = left.register.int32_1 < right.register.int32_1 ? left.register.int32_1 : right.register.int32_1;
+                    vec.register.int32_2 = left.register.int32_2 < right.register.int32_2 ? left.register.int32_2 : right.register.int32_2;
+                    vec.register.int32_3 = left.register.int32_3 < right.register.int32_3 ? left.register.int32_3 : right.register.int32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    vec.register.uint64_0 = left.register.uint64_0 < right.register.uint64_0 ? left.register.uint64_0 : right.register.uint64_0;
+                    vec.register.uint64_1 = left.register.uint64_1 < right.register.uint64_1 ? left.register.uint64_1 : right.register.uint64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    vec.register.int64_0 = left.register.int64_0 < right.register.int64_0 ? left.register.int64_0 : right.register.int64_0;
+                    vec.register.int64_1 = left.register.int64_1 < right.register.int64_1 ? left.register.int64_1 : right.register.int64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    vec.register.single_0 = left.register.single_0 < right.register.single_0 ? left.register.single_0 : right.register.single_0;
+                    vec.register.single_1 = left.register.single_1 < right.register.single_1 ? left.register.single_1 : right.register.single_1;
+                    vec.register.single_2 = left.register.single_2 < right.register.single_2 ? left.register.single_2 : right.register.single_2;
+                    vec.register.single_3 = left.register.single_3 < right.register.single_3 ? left.register.single_3 : right.register.single_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    vec.register.double_0 = left.register.double_0 < right.register.double_0 ? left.register.double_0 : right.register.double_0;
+                    vec.register.double_1 = left.register.double_1 < right.register.double_1 ? left.register.double_1 : right.register.double_1;
+                    return vec;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static unsafe Vector<T> Max(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Byte)(object)left[g] : (Byte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (SByte)(object)left[g] : (SByte)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (UInt16)(object)left[g] : (UInt16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Int16)(object)left[g] : (Int16)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (UInt32)(object)left[g] : (UInt32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Int32)(object)left[g] : (Int32)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (UInt64)(object)left[g] : (UInt64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Int64)(object)left[g] : (Int64)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Single)(object)left[g] : (Single)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = ScalarGreaterThan(left[g], right[g]) ? (Double)(object)left[g] : (Double)(object)right[g];
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                Vector<T> vec = new Vector<T>();
+                if (typeof(T) == typeof(Byte))
+                {
+                    vec.register.byte_0 = left.register.byte_0 > right.register.byte_0 ? left.register.byte_0 : right.register.byte_0;
+                    vec.register.byte_1 = left.register.byte_1 > right.register.byte_1 ? left.register.byte_1 : right.register.byte_1;
+                    vec.register.byte_2 = left.register.byte_2 > right.register.byte_2 ? left.register.byte_2 : right.register.byte_2;
+                    vec.register.byte_3 = left.register.byte_3 > right.register.byte_3 ? left.register.byte_3 : right.register.byte_3;
+                    vec.register.byte_4 = left.register.byte_4 > right.register.byte_4 ? left.register.byte_4 : right.register.byte_4;
+                    vec.register.byte_5 = left.register.byte_5 > right.register.byte_5 ? left.register.byte_5 : right.register.byte_5;
+                    vec.register.byte_6 = left.register.byte_6 > right.register.byte_6 ? left.register.byte_6 : right.register.byte_6;
+                    vec.register.byte_7 = left.register.byte_7 > right.register.byte_7 ? left.register.byte_7 : right.register.byte_7;
+                    vec.register.byte_8 = left.register.byte_8 > right.register.byte_8 ? left.register.byte_8 : right.register.byte_8;
+                    vec.register.byte_9 = left.register.byte_9 > right.register.byte_9 ? left.register.byte_9 : right.register.byte_9;
+                    vec.register.byte_10 = left.register.byte_10 > right.register.byte_10 ? left.register.byte_10 : right.register.byte_10;
+                    vec.register.byte_11 = left.register.byte_11 > right.register.byte_11 ? left.register.byte_11 : right.register.byte_11;
+                    vec.register.byte_12 = left.register.byte_12 > right.register.byte_12 ? left.register.byte_12 : right.register.byte_12;
+                    vec.register.byte_13 = left.register.byte_13 > right.register.byte_13 ? left.register.byte_13 : right.register.byte_13;
+                    vec.register.byte_14 = left.register.byte_14 > right.register.byte_14 ? left.register.byte_14 : right.register.byte_14;
+                    vec.register.byte_15 = left.register.byte_15 > right.register.byte_15 ? left.register.byte_15 : right.register.byte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    vec.register.sbyte_0 = left.register.sbyte_0 > right.register.sbyte_0 ? left.register.sbyte_0 : right.register.sbyte_0;
+                    vec.register.sbyte_1 = left.register.sbyte_1 > right.register.sbyte_1 ? left.register.sbyte_1 : right.register.sbyte_1;
+                    vec.register.sbyte_2 = left.register.sbyte_2 > right.register.sbyte_2 ? left.register.sbyte_2 : right.register.sbyte_2;
+                    vec.register.sbyte_3 = left.register.sbyte_3 > right.register.sbyte_3 ? left.register.sbyte_3 : right.register.sbyte_3;
+                    vec.register.sbyte_4 = left.register.sbyte_4 > right.register.sbyte_4 ? left.register.sbyte_4 : right.register.sbyte_4;
+                    vec.register.sbyte_5 = left.register.sbyte_5 > right.register.sbyte_5 ? left.register.sbyte_5 : right.register.sbyte_5;
+                    vec.register.sbyte_6 = left.register.sbyte_6 > right.register.sbyte_6 ? left.register.sbyte_6 : right.register.sbyte_6;
+                    vec.register.sbyte_7 = left.register.sbyte_7 > right.register.sbyte_7 ? left.register.sbyte_7 : right.register.sbyte_7;
+                    vec.register.sbyte_8 = left.register.sbyte_8 > right.register.sbyte_8 ? left.register.sbyte_8 : right.register.sbyte_8;
+                    vec.register.sbyte_9 = left.register.sbyte_9 > right.register.sbyte_9 ? left.register.sbyte_9 : right.register.sbyte_9;
+                    vec.register.sbyte_10 = left.register.sbyte_10 > right.register.sbyte_10 ? left.register.sbyte_10 : right.register.sbyte_10;
+                    vec.register.sbyte_11 = left.register.sbyte_11 > right.register.sbyte_11 ? left.register.sbyte_11 : right.register.sbyte_11;
+                    vec.register.sbyte_12 = left.register.sbyte_12 > right.register.sbyte_12 ? left.register.sbyte_12 : right.register.sbyte_12;
+                    vec.register.sbyte_13 = left.register.sbyte_13 > right.register.sbyte_13 ? left.register.sbyte_13 : right.register.sbyte_13;
+                    vec.register.sbyte_14 = left.register.sbyte_14 > right.register.sbyte_14 ? left.register.sbyte_14 : right.register.sbyte_14;
+                    vec.register.sbyte_15 = left.register.sbyte_15 > right.register.sbyte_15 ? left.register.sbyte_15 : right.register.sbyte_15;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    vec.register.uint16_0 = left.register.uint16_0 > right.register.uint16_0 ? left.register.uint16_0 : right.register.uint16_0;
+                    vec.register.uint16_1 = left.register.uint16_1 > right.register.uint16_1 ? left.register.uint16_1 : right.register.uint16_1;
+                    vec.register.uint16_2 = left.register.uint16_2 > right.register.uint16_2 ? left.register.uint16_2 : right.register.uint16_2;
+                    vec.register.uint16_3 = left.register.uint16_3 > right.register.uint16_3 ? left.register.uint16_3 : right.register.uint16_3;
+                    vec.register.uint16_4 = left.register.uint16_4 > right.register.uint16_4 ? left.register.uint16_4 : right.register.uint16_4;
+                    vec.register.uint16_5 = left.register.uint16_5 > right.register.uint16_5 ? left.register.uint16_5 : right.register.uint16_5;
+                    vec.register.uint16_6 = left.register.uint16_6 > right.register.uint16_6 ? left.register.uint16_6 : right.register.uint16_6;
+                    vec.register.uint16_7 = left.register.uint16_7 > right.register.uint16_7 ? left.register.uint16_7 : right.register.uint16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    vec.register.int16_0 = left.register.int16_0 > right.register.int16_0 ? left.register.int16_0 : right.register.int16_0;
+                    vec.register.int16_1 = left.register.int16_1 > right.register.int16_1 ? left.register.int16_1 : right.register.int16_1;
+                    vec.register.int16_2 = left.register.int16_2 > right.register.int16_2 ? left.register.int16_2 : right.register.int16_2;
+                    vec.register.int16_3 = left.register.int16_3 > right.register.int16_3 ? left.register.int16_3 : right.register.int16_3;
+                    vec.register.int16_4 = left.register.int16_4 > right.register.int16_4 ? left.register.int16_4 : right.register.int16_4;
+                    vec.register.int16_5 = left.register.int16_5 > right.register.int16_5 ? left.register.int16_5 : right.register.int16_5;
+                    vec.register.int16_6 = left.register.int16_6 > right.register.int16_6 ? left.register.int16_6 : right.register.int16_6;
+                    vec.register.int16_7 = left.register.int16_7 > right.register.int16_7 ? left.register.int16_7 : right.register.int16_7;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    vec.register.uint32_0 = left.register.uint32_0 > right.register.uint32_0 ? left.register.uint32_0 : right.register.uint32_0;
+                    vec.register.uint32_1 = left.register.uint32_1 > right.register.uint32_1 ? left.register.uint32_1 : right.register.uint32_1;
+                    vec.register.uint32_2 = left.register.uint32_2 > right.register.uint32_2 ? left.register.uint32_2 : right.register.uint32_2;
+                    vec.register.uint32_3 = left.register.uint32_3 > right.register.uint32_3 ? left.register.uint32_3 : right.register.uint32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    vec.register.int32_0 = left.register.int32_0 > right.register.int32_0 ? left.register.int32_0 : right.register.int32_0;
+                    vec.register.int32_1 = left.register.int32_1 > right.register.int32_1 ? left.register.int32_1 : right.register.int32_1;
+                    vec.register.int32_2 = left.register.int32_2 > right.register.int32_2 ? left.register.int32_2 : right.register.int32_2;
+                    vec.register.int32_3 = left.register.int32_3 > right.register.int32_3 ? left.register.int32_3 : right.register.int32_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    vec.register.uint64_0 = left.register.uint64_0 > right.register.uint64_0 ? left.register.uint64_0 : right.register.uint64_0;
+                    vec.register.uint64_1 = left.register.uint64_1 > right.register.uint64_1 ? left.register.uint64_1 : right.register.uint64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    vec.register.int64_0 = left.register.int64_0 > right.register.int64_0 ? left.register.int64_0 : right.register.int64_0;
+                    vec.register.int64_1 = left.register.int64_1 > right.register.int64_1 ? left.register.int64_1 : right.register.int64_1;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    vec.register.single_0 = left.register.single_0 > right.register.single_0 ? left.register.single_0 : right.register.single_0;
+                    vec.register.single_1 = left.register.single_1 > right.register.single_1 ? left.register.single_1 : right.register.single_1;
+                    vec.register.single_2 = left.register.single_2 > right.register.single_2 ? left.register.single_2 : right.register.single_2;
+                    vec.register.single_3 = left.register.single_3 > right.register.single_3 ? left.register.single_3 : right.register.single_3;
+                    return vec;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    vec.register.double_0 = left.register.double_0 > right.register.double_0 ? left.register.double_0 : right.register.double_0;
+                    vec.register.double_1 = left.register.double_1 > right.register.double_1 ? left.register.double_1 : right.register.double_1;
+                    return vec;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static T DotProduct(Vector<T> left, Vector<T> right)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                T product = GetZeroValue();
+                for (int g = 0; g < Count; g++)
+                {
+                    product = ScalarAdd(product, ScalarMultiply(left[g], right[g]));
+                }
+                return product;
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte product = 0;
+                    product += (Byte)(left.register.byte_0 * right.register.byte_0);
+                    product += (Byte)(left.register.byte_1 * right.register.byte_1);
+                    product += (Byte)(left.register.byte_2 * right.register.byte_2);
+                    product += (Byte)(left.register.byte_3 * right.register.byte_3);
+                    product += (Byte)(left.register.byte_4 * right.register.byte_4);
+                    product += (Byte)(left.register.byte_5 * right.register.byte_5);
+                    product += (Byte)(left.register.byte_6 * right.register.byte_6);
+                    product += (Byte)(left.register.byte_7 * right.register.byte_7);
+                    product += (Byte)(left.register.byte_8 * right.register.byte_8);
+                    product += (Byte)(left.register.byte_9 * right.register.byte_9);
+                    product += (Byte)(left.register.byte_10 * right.register.byte_10);
+                    product += (Byte)(left.register.byte_11 * right.register.byte_11);
+                    product += (Byte)(left.register.byte_12 * right.register.byte_12);
+                    product += (Byte)(left.register.byte_13 * right.register.byte_13);
+                    product += (Byte)(left.register.byte_14 * right.register.byte_14);
+                    product += (Byte)(left.register.byte_15 * right.register.byte_15);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte product = 0;
+                    product += (SByte)(left.register.sbyte_0 * right.register.sbyte_0);
+                    product += (SByte)(left.register.sbyte_1 * right.register.sbyte_1);
+                    product += (SByte)(left.register.sbyte_2 * right.register.sbyte_2);
+                    product += (SByte)(left.register.sbyte_3 * right.register.sbyte_3);
+                    product += (SByte)(left.register.sbyte_4 * right.register.sbyte_4);
+                    product += (SByte)(left.register.sbyte_5 * right.register.sbyte_5);
+                    product += (SByte)(left.register.sbyte_6 * right.register.sbyte_6);
+                    product += (SByte)(left.register.sbyte_7 * right.register.sbyte_7);
+                    product += (SByte)(left.register.sbyte_8 * right.register.sbyte_8);
+                    product += (SByte)(left.register.sbyte_9 * right.register.sbyte_9);
+                    product += (SByte)(left.register.sbyte_10 * right.register.sbyte_10);
+                    product += (SByte)(left.register.sbyte_11 * right.register.sbyte_11);
+                    product += (SByte)(left.register.sbyte_12 * right.register.sbyte_12);
+                    product += (SByte)(left.register.sbyte_13 * right.register.sbyte_13);
+                    product += (SByte)(left.register.sbyte_14 * right.register.sbyte_14);
+                    product += (SByte)(left.register.sbyte_15 * right.register.sbyte_15);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16 product = 0;
+                    product += (UInt16)(left.register.uint16_0 * right.register.uint16_0);
+                    product += (UInt16)(left.register.uint16_1 * right.register.uint16_1);
+                    product += (UInt16)(left.register.uint16_2 * right.register.uint16_2);
+                    product += (UInt16)(left.register.uint16_3 * right.register.uint16_3);
+                    product += (UInt16)(left.register.uint16_4 * right.register.uint16_4);
+                    product += (UInt16)(left.register.uint16_5 * right.register.uint16_5);
+                    product += (UInt16)(left.register.uint16_6 * right.register.uint16_6);
+                    product += (UInt16)(left.register.uint16_7 * right.register.uint16_7);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16 product = 0;
+                    product += (Int16)(left.register.int16_0 * right.register.int16_0);
+                    product += (Int16)(left.register.int16_1 * right.register.int16_1);
+                    product += (Int16)(left.register.int16_2 * right.register.int16_2);
+                    product += (Int16)(left.register.int16_3 * right.register.int16_3);
+                    product += (Int16)(left.register.int16_4 * right.register.int16_4);
+                    product += (Int16)(left.register.int16_5 * right.register.int16_5);
+                    product += (Int16)(left.register.int16_6 * right.register.int16_6);
+                    product += (Int16)(left.register.int16_7 * right.register.int16_7);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32 product = 0;
+                    product += (UInt32)(left.register.uint32_0 * right.register.uint32_0);
+                    product += (UInt32)(left.register.uint32_1 * right.register.uint32_1);
+                    product += (UInt32)(left.register.uint32_2 * right.register.uint32_2);
+                    product += (UInt32)(left.register.uint32_3 * right.register.uint32_3);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32 product = 0;
+                    product += (Int32)(left.register.int32_0 * right.register.int32_0);
+                    product += (Int32)(left.register.int32_1 * right.register.int32_1);
+                    product += (Int32)(left.register.int32_2 * right.register.int32_2);
+                    product += (Int32)(left.register.int32_3 * right.register.int32_3);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64 product = 0;
+                    product += (UInt64)(left.register.uint64_0 * right.register.uint64_0);
+                    product += (UInt64)(left.register.uint64_1 * right.register.uint64_1);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64 product = 0;
+                    product += (Int64)(left.register.int64_0 * right.register.int64_0);
+                    product += (Int64)(left.register.int64_1 * right.register.int64_1);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single product = 0;
+                    product += (Single)(left.register.single_0 * right.register.single_0);
+                    product += (Single)(left.register.single_1 * right.register.single_1);
+                    product += (Single)(left.register.single_2 * right.register.single_2);
+                    product += (Single)(left.register.single_3 * right.register.single_3);
+                    return (T)(object)product;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double product = 0;
+                    product += (Double)(left.register.double_0 * right.register.double_0);
+                    product += (Double)(left.register.double_1 * right.register.double_1);
+                    return (T)(object)product;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+
+        [JitIntrinsic]
+        internal static unsafe Vector<T> SquareRoot(Vector<T> value)
+        {
+            if (Vector.IsHardwareAccelerated)
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    Byte* dataPtr = stackalloc Byte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Byte)Math.Sqrt((Byte)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    SByte* dataPtr = stackalloc SByte[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (SByte)Math.Sqrt((SByte)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    UInt16* dataPtr = stackalloc UInt16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (UInt16)Math.Sqrt((UInt16)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    Int16* dataPtr = stackalloc Int16[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int16)Math.Sqrt((Int16)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    UInt32* dataPtr = stackalloc UInt32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (UInt32)Math.Sqrt((UInt32)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    Int32* dataPtr = stackalloc Int32[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int32)Math.Sqrt((Int32)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    UInt64* dataPtr = stackalloc UInt64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (UInt64)Math.Sqrt((UInt64)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    Int64* dataPtr = stackalloc Int64[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Int64)Math.Sqrt((Int64)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    Single* dataPtr = stackalloc Single[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Single)Math.Sqrt((Single)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    Double* dataPtr = stackalloc Double[Count];
+                    for (int g = 0; g < Count; g++)
+                    {
+                        dataPtr[g] = (Double)Math.Sqrt((Double)(object)value[g]);
+                    }
+                    return new Vector<T>(dataPtr);
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+            else
+            {
+                if (typeof(T) == typeof(Byte))
+                {
+                    value.register.byte_0 = (Byte)Math.Sqrt(value.register.byte_0);
+                    value.register.byte_1 = (Byte)Math.Sqrt(value.register.byte_1);
+                    value.register.byte_2 = (Byte)Math.Sqrt(value.register.byte_2);
+                    value.register.byte_3 = (Byte)Math.Sqrt(value.register.byte_3);
+                    value.register.byte_4 = (Byte)Math.Sqrt(value.register.byte_4);
+                    value.register.byte_5 = (Byte)Math.Sqrt(value.register.byte_5);
+                    value.register.byte_6 = (Byte)Math.Sqrt(value.register.byte_6);
+                    value.register.byte_7 = (Byte)Math.Sqrt(value.register.byte_7);
+                    value.register.byte_8 = (Byte)Math.Sqrt(value.register.byte_8);
+                    value.register.byte_9 = (Byte)Math.Sqrt(value.register.byte_9);
+                    value.register.byte_10 = (Byte)Math.Sqrt(value.register.byte_10);
+                    value.register.byte_11 = (Byte)Math.Sqrt(value.register.byte_11);
+                    value.register.byte_12 = (Byte)Math.Sqrt(value.register.byte_12);
+                    value.register.byte_13 = (Byte)Math.Sqrt(value.register.byte_13);
+                    value.register.byte_14 = (Byte)Math.Sqrt(value.register.byte_14);
+                    value.register.byte_15 = (Byte)Math.Sqrt(value.register.byte_15);
+                    return value;
+                }
+                else if (typeof(T) == typeof(SByte))
+                {
+                    value.register.sbyte_0 = (SByte)Math.Sqrt(value.register.sbyte_0);
+                    value.register.sbyte_1 = (SByte)Math.Sqrt(value.register.sbyte_1);
+                    value.register.sbyte_2 = (SByte)Math.Sqrt(value.register.sbyte_2);
+                    value.register.sbyte_3 = (SByte)Math.Sqrt(value.register.sbyte_3);
+                    value.register.sbyte_4 = (SByte)Math.Sqrt(value.register.sbyte_4);
+                    value.register.sbyte_5 = (SByte)Math.Sqrt(value.register.sbyte_5);
+                    value.register.sbyte_6 = (SByte)Math.Sqrt(value.register.sbyte_6);
+                    value.register.sbyte_7 = (SByte)Math.Sqrt(value.register.sbyte_7);
+                    value.register.sbyte_8 = (SByte)Math.Sqrt(value.register.sbyte_8);
+                    value.register.sbyte_9 = (SByte)Math.Sqrt(value.register.sbyte_9);
+                    value.register.sbyte_10 = (SByte)Math.Sqrt(value.register.sbyte_10);
+                    value.register.sbyte_11 = (SByte)Math.Sqrt(value.register.sbyte_11);
+                    value.register.sbyte_12 = (SByte)Math.Sqrt(value.register.sbyte_12);
+                    value.register.sbyte_13 = (SByte)Math.Sqrt(value.register.sbyte_13);
+                    value.register.sbyte_14 = (SByte)Math.Sqrt(value.register.sbyte_14);
+                    value.register.sbyte_15 = (SByte)Math.Sqrt(value.register.sbyte_15);
+                    return value;
+                }
+                else if (typeof(T) == typeof(UInt16))
+                {
+                    value.register.uint16_0 = (UInt16)Math.Sqrt(value.register.uint16_0);
+                    value.register.uint16_1 = (UInt16)Math.Sqrt(value.register.uint16_1);
+                    value.register.uint16_2 = (UInt16)Math.Sqrt(value.register.uint16_2);
+                    value.register.uint16_3 = (UInt16)Math.Sqrt(value.register.uint16_3);
+                    value.register.uint16_4 = (UInt16)Math.Sqrt(value.register.uint16_4);
+                    value.register.uint16_5 = (UInt16)Math.Sqrt(value.register.uint16_5);
+                    value.register.uint16_6 = (UInt16)Math.Sqrt(value.register.uint16_6);
+                    value.register.uint16_7 = (UInt16)Math.Sqrt(value.register.uint16_7);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int16))
+                {
+                    value.register.int16_0 = (Int16)Math.Sqrt(value.register.int16_0);
+                    value.register.int16_1 = (Int16)Math.Sqrt(value.register.int16_1);
+                    value.register.int16_2 = (Int16)Math.Sqrt(value.register.int16_2);
+                    value.register.int16_3 = (Int16)Math.Sqrt(value.register.int16_3);
+                    value.register.int16_4 = (Int16)Math.Sqrt(value.register.int16_4);
+                    value.register.int16_5 = (Int16)Math.Sqrt(value.register.int16_5);
+                    value.register.int16_6 = (Int16)Math.Sqrt(value.register.int16_6);
+                    value.register.int16_7 = (Int16)Math.Sqrt(value.register.int16_7);
+                    return value;
+                }
+                else if (typeof(T) == typeof(UInt32))
+                {
+                    value.register.uint32_0 = (UInt32)Math.Sqrt(value.register.uint32_0);
+                    value.register.uint32_1 = (UInt32)Math.Sqrt(value.register.uint32_1);
+                    value.register.uint32_2 = (UInt32)Math.Sqrt(value.register.uint32_2);
+                    value.register.uint32_3 = (UInt32)Math.Sqrt(value.register.uint32_3);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int32))
+                {
+                    value.register.int32_0 = (Int32)Math.Sqrt(value.register.int32_0);
+                    value.register.int32_1 = (Int32)Math.Sqrt(value.register.int32_1);
+                    value.register.int32_2 = (Int32)Math.Sqrt(value.register.int32_2);
+                    value.register.int32_3 = (Int32)Math.Sqrt(value.register.int32_3);
+                    return value;
+                }
+                else if (typeof(T) == typeof(UInt64))
+                {
+                    value.register.uint64_0 = (UInt64)Math.Sqrt(value.register.uint64_0);
+                    value.register.uint64_1 = (UInt64)Math.Sqrt(value.register.uint64_1);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Int64))
+                {
+                    value.register.int64_0 = (Int64)Math.Sqrt(value.register.int64_0);
+                    value.register.int64_1 = (Int64)Math.Sqrt(value.register.int64_1);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Single))
+                {
+                    value.register.single_0 = (Single)Math.Sqrt(value.register.single_0);
+                    value.register.single_1 = (Single)Math.Sqrt(value.register.single_1);
+                    value.register.single_2 = (Single)Math.Sqrt(value.register.single_2);
+                    value.register.single_3 = (Single)Math.Sqrt(value.register.single_3);
+                    return value;
+                }
+                else if (typeof(T) == typeof(Double))
+                {
+                    value.register.double_0 = (Double)Math.Sqrt(value.register.double_0);
+                    value.register.double_1 = (Double)Math.Sqrt(value.register.double_1);
+                    return value;
+                }
+                else
+                {
+                    throw new NotSupportedException(SR.Arg_TypeNotSupported);
+                }
+            }
+        }
+        #endregion Internal Math Methods
+
+        #region Helper Methods
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static bool ScalarEquals(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (Byte)(object)left == (Byte)(object)right;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (SByte)(object)left == (SByte)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (UInt16)(object)left == (UInt16)(object)right;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (Int16)(object)left == (Int16)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (UInt32)(object)left == (UInt32)(object)right;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (Int32)(object)left == (Int32)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (UInt64)(object)left == (UInt64)(object)right;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (Int64)(object)left == (Int64)(object)right;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (Single)(object)left == (Single)(object)right;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (Double)(object)left == (Double)(object)right;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static bool ScalarLessThan(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (Byte)(object)left < (Byte)(object)right;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (SByte)(object)left < (SByte)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (UInt16)(object)left < (UInt16)(object)right;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (Int16)(object)left < (Int16)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (UInt32)(object)left < (UInt32)(object)right;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (Int32)(object)left < (Int32)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (UInt64)(object)left < (UInt64)(object)right;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (Int64)(object)left < (Int64)(object)right;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (Single)(object)left < (Single)(object)right;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (Double)(object)left < (Double)(object)right;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static bool ScalarGreaterThan(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (Byte)(object)left > (Byte)(object)right;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (SByte)(object)left > (SByte)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (UInt16)(object)left > (UInt16)(object)right;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (Int16)(object)left > (Int16)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (UInt32)(object)left > (UInt32)(object)right;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (Int32)(object)left > (Int32)(object)right;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (UInt64)(object)left > (UInt64)(object)right;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (Int64)(object)left > (Int64)(object)right;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (Single)(object)left > (Single)(object)right;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (Double)(object)left > (Double)(object)right;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarAdd(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left + (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left + (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left + (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left + (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left + (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left + (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left + (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left + (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left + (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left + (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarSubtract(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left - (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left - (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left - (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left - (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left - (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left - (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left - (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left - (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left - (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left - (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarMultiply(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left * (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left * (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left * (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left * (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left * (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left * (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left * (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left * (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left * (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left * (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T ScalarDivide(T left, T right)
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)(Byte)((Byte)(object)left / (Byte)(object)right);
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)(SByte)((SByte)(object)left / (SByte)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)(UInt16)((UInt16)(object)left / (UInt16)(object)right);
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)(Int16)((Int16)(object)left / (Int16)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)(UInt32)((UInt32)(object)left / (UInt32)(object)right);
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)(Int32)((Int32)(object)left / (Int32)(object)right);
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)(UInt64)((UInt64)(object)left / (UInt64)(object)right);
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)(Int64)((Int64)(object)left / (Int64)(object)right);
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)(Single)((Single)(object)left / (Single)(object)right);
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)(Double)((Double)(object)left / (Double)(object)right);
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T GetZeroValue()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                Byte value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                SByte value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                UInt16 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                Int16 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                UInt32 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                Int32 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                UInt64 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                Int64 value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                Single value = 0;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                Double value = 0;
+                return (T)(object)value;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T GetOneValue()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                Byte value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                SByte value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                UInt16 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                Int16 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                UInt32 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                Int32 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                UInt64 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                Int64 value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                Single value = 1;
+                return (T)(object)value;
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                Double value = 1;
+                return (T)(object)value;
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        private static T GetAllBitsSetValue()
+        {
+            if (typeof(T) == typeof(Byte))
+            {
+                return (T)(object)ConstantHelper.GetByteWithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(SByte))
+            {
+                return (T)(object)ConstantHelper.GetSByteWithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(UInt16))
+            {
+                return (T)(object)ConstantHelper.GetUInt16WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Int16))
+            {
+                return (T)(object)ConstantHelper.GetInt16WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(UInt32))
+            {
+                return (T)(object)ConstantHelper.GetUInt32WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Int32))
+            {
+                return (T)(object)ConstantHelper.GetInt32WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(UInt64))
+            {
+                return (T)(object)ConstantHelper.GetUInt64WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Int64))
+            {
+                return (T)(object)ConstantHelper.GetInt64WithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Single))
+            {
+                return (T)(object)ConstantHelper.GetSingleWithAllBitsSet();
+            }
+            else if (typeof(T) == typeof(Double))
+            {
+                return (T)(object)ConstantHelper.GetDoubleWithAllBitsSet();
+            }
+            else
+            {
+                throw new NotSupportedException(SR.Arg_TypeNotSupported);
+            }
+        }
+        #endregion
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/System.Numerics/Vector_Operations.cs b/mcs/class/System.Numerics.Vectors/System.Numerics/Vector_Operations.cs
new file mode 100644 (file)
index 0000000..83a5ad3
--- /dev/null
@@ -0,0 +1,865 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.CompilerServices;
+
+namespace System.Numerics
+{
+    /// <summary>
+    /// Contains various methods useful for creating, manipulating, combining, and converting generic vectors with one another.
+    /// </summary>
+    public static class Vector
+    {
+        // JIT is not looking at the Vector class methods
+        // all methods here should be inlined and they must be implemented in terms of Vector<T> intrinsics
+        #region Select Methods
+        /// <summary>
+        /// Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.
+        /// </summary>
+        /// <param name="condition">The integral mask vector used to drive selection.</param>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The new vector with elements selected based on the mask.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Single> ConditionalSelect(Vector<int> condition, Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<Single>)Vector<Single>.ConditionalSelect((Vector<Single>)condition, left, right);
+        }
+
+        /// <summary>
+        /// Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.
+        /// </summary>
+        /// <param name="condition">The integral mask vector used to drive selection.</param>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The new vector with elements selected based on the mask.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<double> ConditionalSelect(Vector<long> condition, Vector<double> left, Vector<double> right)
+        {
+            return (Vector<double>)Vector<double>.ConditionalSelect((Vector<double>)condition, left, right);
+        }
+
+        /// <summary>
+        /// Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.
+        /// </summary>
+        /// <param name="condition">The mask vector used to drive selection.</param>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The new vector with elements selected based on the mask.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> ConditionalSelect<T>(Vector<T> condition, Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.ConditionalSelect(condition, left, right);
+        }
+        #endregion Select Methods
+
+        #region Comparison methods
+        #region Equals methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left and right were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Equals<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether elements in the left and right floating point vectors were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> Equals(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left and right were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> Equals(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether elements in the left and right floating point vectors were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> Equals(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left and right were equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> Equals(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.Equals(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether each pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The first vector to compare.</param>
+        /// <returns>True if all elements are equal; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool EqualsAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left == right;
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any single pair of elements in the given vectors are equal.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any element pairs are equal; False if no element pairs are equal.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool EqualsAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return !Vector<T>.Equals(left, right).Equals(Vector<T>.Zero);
+        }
+        #endregion Equals methods
+
+        #region Lessthan Methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> LessThan<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThan(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThan(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThan(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThan(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.LessThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all of the elements in left are less than their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are less than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThan(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is less than its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are less than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThan(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion LessthanMethods
+
+        #region Lessthanorequal methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> LessThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThanOrEqual(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> LessThanOrEqual(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThanOrEqual(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were less than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> LessThanOrEqual(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.LessThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all elements in left are less than or equal to their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are less than or equal to their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanOrEqualAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThanOrEqual(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is less than or equal to its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are less than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool LessThanOrEqualAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.LessThanOrEqual(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion Lessthanorequal methods
+
+        #region Greaterthan methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> GreaterThan<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThan(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThan(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThan(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThan(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.GreaterThan(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all elements in left are greater than the corresponding elements in right.
+        /// elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are greater than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThan(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is greater than its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are greater than their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThan(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion Greaterthan methods
+
+        #region Greaterthanorequal methods
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> GreaterThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThanOrEqual(Vector<Single> left, Vector<Single> right)
+        {
+            return (Vector<int>)Vector<Single>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<int> GreaterThanOrEqual(Vector<int> left, Vector<int> right)
+        {
+            return Vector<int>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements signal whether the elements in left were greater than or equal to their
+        /// corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThanOrEqual(Vector<long> left, Vector<long> right)
+        {
+            return Vector<long>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns an integral vector whose elements signal whether the elements in left were greater than or equal to 
+        /// their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>The resultant integral vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<long> GreaterThanOrEqual(Vector<double> left, Vector<double> right)
+        {
+            return (Vector<long>)Vector<double>.GreaterThanOrEqual(left, right);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether all of the elements in left are greater than or equal to 
+        /// their corresponding elements in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if all elements in left are greater than or equal to their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanOrEqualAll<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThanOrEqual(left, right);
+            return cond.Equals(Vector<int>.AllOnes);
+        }
+
+        /// <summary>
+        /// Returns a boolean indicating whether any element in left is greater than or equal to its corresponding element in right.
+        /// </summary>
+        /// <param name="left">The first vector to compare.</param>
+        /// <param name="right">The second vector to compare.</param>
+        /// <returns>True if any elements in left are greater than or equal to their corresponding elements in right; False otherwise.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static bool GreaterThanOrEqualAny<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            Vector<int> cond = (Vector<int>)Vector<T>.GreaterThanOrEqual(left, right);
+            return !cond.Equals(Vector<int>.Zero);
+        }
+        #endregion Greaterthanorequal methods
+        #endregion Comparison methods
+
+        #region Vector Math Methods
+        // Every operation must either be a JIT intrinsic or implemented over a JIT intrinsic
+        // as a thin wrapper
+        // Operations implemented over a JIT intrinsic should be inlined
+        // Methods that do not have a <T> type parameter are recognized as intrinsics
+        /// <summary>
+        /// Returns whether or not vector operations are subject to hardware acceleration through JIT intrinsic support.
+        /// </summary>
+        [JitIntrinsic]
+        public static bool IsHardwareAccelerated
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        // Vector<T>
+        // Basic Math
+        // All Math operations for Vector<T> are aggressively inlined here
+
+        /// <summary>
+        /// Returns a new vector whose elements are the absolute values of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The absolute value vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Abs<T>(Vector<T> value) where T : struct
+        {
+            return Vector<T>.Abs(value);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the minimum of each pair of elements in the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The minimum vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Min<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.Min(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the maximum of each pair of elements in the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The maximum vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Max<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.Max(left, right);
+        }
+
+        // Specialized vector operations
+
+        /// <summary>
+        /// Returns the dot product of two vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The dot product.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static T Dot<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return Vector<T>.DotProduct(left, right);
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the square roots of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The square root vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> SquareRoot<T>(Vector<T> value) where T : struct
+        {
+            return Vector<T>.SquareRoot(value);
+        }
+        #endregion Vector Math Methods
+
+        #region Named Arithmetic Operators
+        /// <summary>
+        /// Creates a new vector whose values are the sum of each pair of elements from the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The summed vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Add<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left + right;
+        }
+
+        /// <summary>
+        /// Creates a new vector whose values are the difference between each pairs of elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The difference vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Subtract<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left - right;
+        }
+
+        /// <summary>
+        /// Creates a new vector whose values are the product of each pair of elements from the two given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The summed vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Multiply<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left * right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose values are the values of the given vector each multiplied by a scalar value.
+        /// </summary>
+        /// <param name="left">The source vector.</param>
+        /// <param name="right">The scalar factor.</param>
+        /// <returns>The scaled vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Multiply<T>(Vector<T> left, T right) where T : struct
+        {
+            return left * right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose values are the values of the given vector each multiplied by a scalar value.
+        /// </summary>
+        /// <param name="left">The scalar factor.</param>
+        /// <param name="right">The source vector.</param>
+        /// <returns>The scaled vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Multiply<T>(T left, Vector<T> right) where T : struct
+        {
+            return left * right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose values are the result of dividing the first vector's elements 
+        /// by the corresponding elements in the second vector.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The divided vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Divide<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left / right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are the given vector's elements negated.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The negated vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Negate<T>(Vector<T> value) where T : struct
+        {
+            return -value;
+        }
+        #endregion Named Arithmetic Operators
+
+        #region Named Bitwise Operators
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-and operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> BitwiseAnd<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left & right;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> BitwiseOr<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left | right;
+        }
+
+        /// <summary>
+        /// Returns a new vector whose elements are obtained by taking the one's complement of the given vector's elements.
+        /// </summary>
+        /// <param name="value">The source vector.</param>
+        /// <returns>The one's complement vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> OnesComplement<T>(Vector<T> value) where T : struct
+        {
+            return ~value;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-exclusive-or operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> Xor<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left ^ right;
+        }
+
+        /// <summary>
+        /// Returns a new vector by performing a bitwise-and-not operation on each of the elements in the given vectors.
+        /// </summary>
+        /// <param name="left">The first source vector.</param>
+        /// <param name="right">The second source vector.</param>
+        /// <returns>The resultant vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<T> AndNot<T>(Vector<T> left, Vector<T> right) where T : struct
+        {
+            return left & ~right;
+        }
+        #endregion Named Bitwise Operators
+
+        #region Conversion Methods
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of unsigned bytes.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Byte> AsVectorByte<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Byte>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed bytes.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<SByte> AsVectorSByte<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<SByte>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of 16-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<UInt16> AsVectorUInt16<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<UInt16>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed 16-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Int16> AsVectorInt16<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Int16>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of unsigned 32-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<UInt32> AsVectorUInt32<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<UInt32>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed 32-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Int32> AsVectorInt32<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Int32>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of unsigned 64-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [CLSCompliant(false)]
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<UInt64> AsVectorUInt64<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<UInt64>)value;
+        }
+
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of signed 64-bit integers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Int64> AsVectorInt64<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Int64>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of 32-bit floating point numbers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Single> AsVectorSingle<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Single>)value;
+        }
+
+        /// <summary>
+        /// Reinterprets the bits of the given vector into those of a vector of 64-bit floating point numbers.
+        /// </summary>
+        /// <param name="value">The source vector</param>
+        /// <returns>The reinterpreted vector.</returns>
+        [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
+        public static Vector<Double> AsVectorDouble<T>(Vector<T> value) where T : struct
+        {
+            return (Vector<Double>)value;
+        }
+        #endregion Conversion Methods
+    }
+}
diff --git a/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.exclude.sources b/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.exclude.sources
new file mode 100644 (file)
index 0000000..0b18840
--- /dev/null
@@ -0,0 +1,7 @@
+SR.cs
+System.Numerics/ConstantHelper.cs
+System.Numerics/HashCodeHelper.cs
+System.Numerics/JitIntrinsicAttribute.cs
+System.Numerics/Register.cs
+System.Numerics/Vector_Operations.cs
+System.Numerics/Vector.cs
diff --git a/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.sources b/mcs/class/System.Numerics.Vectors/net_4_x_System.Numerics.Vectors.dll.sources
new file mode 100644 (file)
index 0000000..d4f1837
--- /dev/null
@@ -0,0 +1 @@
+#include System.Numerics.Vectors.dll.sources
diff --git a/mcs/class/System.Reflection.Context/Assembly/AssemblyInfo.cs b/mcs/class/System.Reflection.Context/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..67d4912
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Reflection.Context.dll")]
+[assembly: AssemblyDescription ("System.Reflection.Context.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.Context.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Reflection.Context/Makefile b/mcs/class/System.Reflection.Context/Makefile
new file mode 100644 (file)
index 0000000..73bee9e
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Reflection.Context
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Reflection.Context.dll
+LIB_REFS = System
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Reflection.Context/System.Reflection.Context.dll.sources b/mcs/class/System.Reflection.Context/System.Reflection.Context.dll.sources
new file mode 100644 (file)
index 0000000..1820689
--- /dev/null
@@ -0,0 +1,5 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Reflection.Context/CustomReflectionContext.cs
diff --git a/mcs/class/System.Reflection.Context/System.Reflection.Context/CustomReflectionContext.cs b/mcs/class/System.Reflection.Context/System.Reflection.Context/CustomReflectionContext.cs
new file mode 100644 (file)
index 0000000..28a6e62
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// CustomReflectionContext.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace System.Reflection.Context
+{
+       public abstract class CustomReflectionContext : ReflectionContext
+       {
+               [MonoTODO]
+               protected CustomReflectionContext ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected CustomReflectionContext (ReflectionContext source)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual IEnumerable<PropertyInfo> AddProperties (Type type)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected PropertyInfo CreateProperty (Type propertyType, string name, Func<object, object> getter, Action<object, object> setter)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected PropertyInfo CreateProperty (Type propertyType, string name, Func<object, object> getter, Action<object, object> setter, IEnumerable<Attribute> propertyCustomAttributes, IEnumerable<Attribute> getterCustomAttributes, IEnumerable<Attribute> setterCustomAttributes)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual IEnumerable<object> GetCustomAttributes (MemberInfo member, IEnumerable<object> declaredAttributes)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected virtual IEnumerable<object> GetCustomAttributes (ParameterInfo parameter, IEnumerable<object> declaredAttributes)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override Assembly MapAssembly (Assembly assembly)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override TypeInfo MapType (TypeInfo type)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
diff --git a/mcs/class/System.Reflection.DispatchProxy/Assembly/AssemblyInfo.cs b/mcs/class/System.Reflection.DispatchProxy/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..993d77c
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyDescription ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.DispatchProxy.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Reflection.DispatchProxy/Makefile b/mcs/class/System.Reflection.DispatchProxy/Makefile
new file mode 100644 (file)
index 0000000..ddc8396
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Reflection.DispatchProxy
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Reflection.DispatchProxy.dll
+LIB_REFS = System
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources b/mcs/class/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources
new file mode 100644 (file)
index 0000000..da5d484
--- /dev/null
@@ -0,0 +1,5 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Reflection/DispatchProxy.cs
diff --git a/mcs/class/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs b/mcs/class/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs
new file mode 100644 (file)
index 0000000..540e525
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// DispatchProxy.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+namespace System.Reflection
+{
+       public abstract class DispatchProxy
+       {
+               [MonoTODO]
+               protected DispatchProxy()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static T Create<T, TProxy> () where TProxy : DispatchProxy
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected abstract object Invoke (MethodInfo targetMethod, object[] args);
+       }
+}
index 2e4032b44ddfa5d21c21b30ec9a440c7fffb1125..d2cd4b21f49af1dbbbf31a7ddc9a49dd6cf5aca1 100644 (file)
@@ -1,60 +1,61 @@
-//
-// ProtectedData.cs: Protect (encrypt) data without (user involved) key management
-//
+//\r
+// ProtectedData.cs: Protect (encrypt) data without (user involved) key management\r
+//\r
 // Author:\r
 //     Sebastien Pouliot  <sebastien@ximian.com>\r
-//
+//\r
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)\r
 // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)\r
-//
-// 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.
-//
-
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+\r
 \r
 using System.Runtime.InteropServices;\r
-using System.Security.Permissions;
-
-using Mono.Security.Cryptography;
-
-namespace System.Security.Cryptography {
-
-       // References:
-       // a.   Windows Data Protection
-       //      http://msdn.microsoft.com/library/en-us/dnsecure/html/windataprotection-dpapi.asp?frame=true
-
-       public sealed class ProtectedData {
-
-               private ProtectedData ()
-               {
-               }
-
+using System.Security.Permissions;\r
+\r
+using Mono.Security.Cryptography;\r
+\r
+namespace System.Security.Cryptography {\r
+\r
+       // References:\r
+       // a.   Windows Data Protection\r
+       //      http://msdn.microsoft.com/library/en-us/dnsecure/html/windataprotection-dpapi.asp?frame=true\r
+\r
+       public sealed class ProtectedData {\r
+\r
+               private ProtectedData ()\r
+               {\r
+               }\r
+\r
 // FIXME       [DataProtectionPermission (SecurityAction.Demand, ProtectData = true)]\r
-               public static byte[] Protect (byte[] userData, byte[] optionalEntropy, DataProtectionScope scope) 
-               {
-                       if (userData == null)
-                               throw new ArgumentNullException ("userData");
-
+               public static byte[] Protect (byte[] userData, byte[] optionalEntropy, DataProtectionScope scope) \r
+               {\r
+                       if (userData == null)\r
+                               throw new ArgumentNullException ("userData");\r
+\r
                        // on Windows this is supported only under 2000 and later OS\r
                        Check (scope);\r
 \r
                        switch (impl) {\r
+#if !MOBILE\r
                        case DataProtectionImplementation.ManagedProtection:\r
                                try {\r
                                        return ManagedProtection.Protect (userData, optionalEntropy, scope);\r
@@ -71,21 +72,23 @@ namespace System.Security.Cryptography {
                                        string msg = Locale.GetText ("Data protection failed.");\r
                                        throw new CryptographicException (msg, e);\r
                                }\r
+#endif\r
                        default:\r
                                throw new PlatformNotSupportedException ();\r
                        }\r
                }\r
 \r
 // FIXME       [DataProtectionPermission (SecurityAction.Demand, UnprotectData = true)]\r
-               public static byte[] Unprotect (byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) 
-               {
-                       if (encryptedData == null)
-                               throw new ArgumentNullException ("encryptedData");
-
+               public static byte[] Unprotect (byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) \r
+               {\r
+                       if (encryptedData == null)\r
+                               throw new ArgumentNullException ("encryptedData");\r
+\r
                        // on Windows this is supported only under 2000 and later OS\r
                        Check (scope);\r
 \r
                        switch (impl) {\r
+#if !MOBILE\r
                        case DataProtectionImplementation.ManagedProtection:\r
                                try {\r
                                        return ManagedProtection.Unprotect (encryptedData, optionalEntropy, scope);\r
@@ -102,11 +105,12 @@ namespace System.Security.Cryptography {
                                        string msg = Locale.GetText ("Data unprotection failed.");\r
                                        throw new CryptographicException (msg, e);\r
                                }\r
+#endif\r
                        default:\r
                                throw new PlatformNotSupportedException ();\r
                        }\r
-               }
-
+               }\r
+\r
                // private stuff\r
 \r
                enum DataProtectionImplementation {\r
@@ -156,6 +160,6 @@ namespace System.Security.Cryptography {
                                throw new PlatformNotSupportedException ();\r
                        }\r
                }\r
-       }
-}
-
+       }\r
+}\r
+\r
diff --git a/mcs/class/System.Security/common_System.Security.dll.sources b/mcs/class/System.Security/common_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..5a34119
--- /dev/null
@@ -0,0 +1,34 @@
+Assembly/AssemblyInfo.cs
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+System.Security.Cryptography/CryptographicAttribute.cs
+System.Security.Cryptography/CryptographicAttributeCollection.cs
+System.Security.Cryptography/CryptographicAttributeEnumerator.cs
+System.Security.Cryptography/DataProtectionScope.cs
+System.Security.Cryptography/ProtectedData.cs
+System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
+System.Security.Cryptography.Pkcs/CmsRecipient.cs
+System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs
+System.Security.Cryptography.Pkcs/CmsRecipientEnumerator.cs
+System.Security.Cryptography.Pkcs/ContentInfo.cs
+System.Security.Cryptography.Pkcs/EnvelopedCms.cs
+System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs
+System.Security.Cryptography.Pkcs/KeyTransRecipientInfo.cs
+System.Security.Cryptography.Pkcs/Pkcs9Attribute.cs
+System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs
+System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs
+System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs
+System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs
+System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs
+System.Security.Cryptography.Pkcs/PublicKeyInfo.cs
+System.Security.Cryptography.Pkcs/RecipientInfo.cs
+System.Security.Cryptography.Pkcs/RecipientInfoCollection.cs
+System.Security.Cryptography.Pkcs/RecipientInfoEnumerator.cs
+System.Security.Cryptography.Pkcs/RecipientInfoType.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifier.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifierOrKey.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifierOrKeyType.cs
+System.Security.Cryptography.Pkcs/SubjectIdentifierType.cs
+System.Security.Cryptography.Xml/X509IssuerSerial.cs
+
diff --git a/mcs/class/System.Security/mobile_static_System.Security.dll.sources b/mcs/class/System.Security/mobile_static_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monodroid_System.Security.dll.sources b/mcs/class/System.Security/monodroid_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_System.Security.dll.sources b/mcs/class/System.Security/monotouch_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_runtime_System.Security.dll.sources b/mcs/class/System.Security/monotouch_runtime_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_tv_System.Security.dll.sources b/mcs/class/System.Security/monotouch_tv_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_tv_runtime_System.Security.dll.sources b/mcs/class/System.Security/monotouch_tv_runtime_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_watch_System.Security.dll.sources b/mcs/class/System.Security/monotouch_watch_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/monotouch_watch_runtime_System.Security.dll.sources b/mcs/class/System.Security/monotouch_watch_runtime_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
diff --git a/mcs/class/System.Security/xammac_System.Security.dll.sources b/mcs/class/System.Security/xammac_System.Security.dll.sources
new file mode 100644 (file)
index 0000000..599b7fa
--- /dev/null
@@ -0,0 +1 @@
+#include common_System.Security.dll.sources
index 4a22c093813b6bed844487fc386ae53b40257042..4fc4f14eee454fa3302758c4ce0b172c7cfd61e3 100644 (file)
@@ -33,7 +33,9 @@ using System.Net;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.Xml;
+#if !MOBILE && !XAMMAC_4_5
 using WS = System.Web.Services.Description;
+#endif
 
 namespace System.ServiceModel.Channels
 {
@@ -119,6 +121,7 @@ namespace System.ServiceModel.Channels
                        return false;
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
@@ -132,6 +135,7 @@ namespace System.ServiceModel.Channels
                        }
                        return false;
                }
+#endif
 
                public override T GetProperty<T> (BindingContext context)
                {
@@ -141,6 +145,7 @@ namespace System.ServiceModel.Channels
                        return base.GetProperty<T> (context);
                }
 
+#if !MOBILE && !XAMMAC_4_5
                void IWsdlExportExtension.ExportContract (WsdlExporter exporter,
                                                          WsdlContractConversionContext context)
                {
@@ -192,5 +197,6 @@ namespace System.ServiceModel.Channels
                                transfer_mode == TransferMode.StreamedResponse)
                                assertions.Add (doc.CreateElement ("msf", "Streamed", "http://schemas.microsoft.com/ws/2006/05/framing/policy"));
                }
+#endif
        }
 }
index 3201ef86eb664118064f372eb0298e88d5d9b6d9..12be181d6d7d1a2a264a7bdbaa1d8c22414da6f5 100644 (file)
@@ -43,16 +43,21 @@ namespace System.ServiceModel.Channels
        {
                public SslStreamSecurityBindingElement ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        verifier = IdentityVerifier.CreateDefault ();
+#endif
                }
 
+#if !MOBILE && !XAMMAC_4_5
                IdentityVerifier verifier;
-               bool require_client_certificate;
 
                public IdentityVerifier IdentityVerifier {
                        get { return verifier; }
                        set { verifier = value; }
                }
+#endif
+
+               bool require_client_certificate;
 
                public bool RequireClientCertificate {
                        get { return require_client_certificate; }
@@ -63,10 +68,13 @@ namespace System.ServiceModel.Channels
                        SslStreamSecurityBindingElement other)
                        : base (other)
                {
+#if !MOBILE && !XAMMAC_4_5
                        verifier = other.verifier;
+#endif
                        require_client_certificate = other.require_client_certificate;
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public StreamUpgradeProvider BuildClientStreamUpgradeProvider (BindingContext context)
                {
@@ -87,6 +95,7 @@ namespace System.ServiceModel.Channels
                                "msf", "SslTransportSecurity", PolicyImportHelper.FramingPolicyNS);
                        return element;
                }
+#endif
 
                [MonoTODO]
                public override IChannelFactory<TChannel>
@@ -96,6 +105,7 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
@@ -103,6 +113,7 @@ namespace System.ServiceModel.Channels
                {
                        throw new NotImplementedException ();
                }
+#endif
 
                [MonoTODO]
                public override bool CanBuildChannelFactory<TChannel> (
@@ -111,12 +122,14 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
                        throw new NotImplementedException ();
                }
+#endif
 
                public override BindingElement Clone ()
                {
@@ -129,6 +142,7 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                #region explicit interface implementations
                [MonoTODO]
                void IPolicyExportExtension.ExportPolicy (
@@ -140,5 +154,6 @@ namespace System.ServiceModel.Channels
                        context.GetBindingAssertions ().Add (transportBinding);
                }
                #endregion
+#endif
        }
 }
index 64c3b38a249d89c6383ee8b0e6edc8573ba934e7..ae823e534ebd876c8672cf0708f3f2e2891886d6 100644 (file)
@@ -31,7 +31,9 @@ using System;
 using System.Collections.Generic;
 using System.Net;
 using System.ServiceModel.Channels;
+#if !MOBILE && !XAMMAC_4_5
 using System.ServiceModel.Channels.NetTcp;
+#endif
 using System.ServiceModel.Description;
 
 namespace System.ServiceModel.Channels
@@ -88,9 +90,15 @@ namespace System.ServiceModel.Channels
                {
                        if (!CanBuildChannelFactory<TChannel> (context))
                                throw new InvalidOperationException (String.Format ("Not supported channel factory type '{0}'", typeof (TChannel)));
+
+#if !MOBILE && !XAMMAC_4_5
                        return new TcpChannelFactory<TChannel> (this, context);
+#else
+                       throw new NotImplementedException ();
+#endif
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
                        BindingContext context)
@@ -99,6 +107,7 @@ namespace System.ServiceModel.Channels
                                throw new InvalidOperationException (String.Format ("Not supported channel listener type '{0}'", typeof (TChannel)));
                        return new TcpChannelListener<TChannel> (this, context);
                }
+#endif
 
                public override BindingElement Clone ()
                {
index 4f1a5fde8f20298e778c7af08a98c5138b246aee..bab577c5bae65551901ae3f14e54e84dc1b61a06 100644 (file)
@@ -56,7 +56,7 @@ namespace System.ServiceModel.Channels
                        max_recv_message_size = other.max_recv_message_size;
                }
 
-               public bool ManualAddressing {
+               public virtual bool ManualAddressing {
                        get { return manual_addressing; }
                        set { manual_addressing = value; }
                }
index e57cfde91e3b4e386d382a1607373eb66b5adf14..2d8e461f7356a070b857afaefe9d0fb0ec2a041f 100644 (file)
@@ -61,12 +61,14 @@ namespace System.ServiceModel.Channels
                        return context.BuildInnerChannelFactory<TChannel> ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
                        BindingContext context)
                {
                        return context.BuildInnerChannelListener<TChannel> ();
                }
+#endif
 
                public override bool CanBuildChannelFactory<TChannel> (
                        BindingContext context)
@@ -74,11 +76,13 @@ namespace System.ServiceModel.Channels
                        return context.CanBuildInnerChannelFactory<TChannel> ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public override bool CanBuildChannelListener<TChannel> (
                        BindingContext context)
                {
                        return context.CanBuildInnerChannelListener<TChannel> ();
                }
+#endif
 
                public override BindingElement Clone ()
                {
@@ -89,8 +93,10 @@ namespace System.ServiceModel.Channels
                {
                        if (typeof (T) == typeof (ISecurityCapabilities))
                                return (T) (object) this;
+#if !MOBILE && !XAMMAC_4_5
                        if (typeof (T) == typeof (IdentityVerifier))
                                return (T) (object) IdentityVerifier.CreateDefault ();
+#endif
                        return null;
                }
 
@@ -120,6 +126,7 @@ namespace System.ServiceModel.Channels
                        get { throw new NotImplementedException (); }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                void IPolicyExportExtension.ExportPolicy (
                        MetadataExporter exporter,
@@ -141,6 +148,7 @@ namespace System.ServiceModel.Channels
                        element.AppendChild (protectionLevel);
                        return element;
                }
+#endif
                #endregion
        }
 }
index 41c6658f9cfd6e75559032e18ea1f3355d6aed46..3d8e71035a0f6c3a1bff8dd34dc527866e2b3131 100644 (file)
 // 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.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
 
+#if !MOBILE && !XAMMAC_4_5
 using ReqType = System.ServiceModel.Security.Tokens.ServiceModelSecurityTokenRequirement;
+#endif
 
 namespace System.ServiceModel.Security.Tokens
 {
        public class SecureConversationSecurityTokenParameters : SecurityTokenParameters
        {
+#if !MOBILE && !XAMMAC_4_5
                static readonly ChannelProtectionRequirements default_channel_protection_requirements;
+#endif
                static readonly BindingContext dummy_context;
 
                static SecureConversationSecurityTokenParameters ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        ChannelProtectionRequirements r =
                                new ChannelProtectionRequirements ();
                        r.IncomingSignatureParts.ChannelParts.IsBodyIncluded = true;
@@ -49,6 +56,7 @@ namespace System.ServiceModel.Security.Tokens
                        r.OutgoingEncryptionParts.ChannelParts.IsBodyIncluded = true;
                        r.MakeReadOnly ();
                        default_channel_protection_requirements = r;
+#endif
 
                        dummy_context = new BindingContext (
                                new CustomBinding (),
@@ -56,7 +64,9 @@ namespace System.ServiceModel.Security.Tokens
                }
 
                SecurityBindingElement element;
+#if !MOBILE && !XAMMAC_4_5
                ChannelProtectionRequirements requirements;
+#endif
                bool cancellable;
 
                public SecureConversationSecurityTokenParameters ()
@@ -77,6 +87,7 @@ namespace System.ServiceModel.Security.Tokens
                {
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public SecureConversationSecurityTokenParameters (
                        SecurityBindingElement element,
                        bool requireCancellation,
@@ -89,13 +100,25 @@ namespace System.ServiceModel.Security.Tokens
                        else
                                this.requirements = new ChannelProtectionRequirements (requirements);
                }
+#else
+               internal SecureConversationSecurityTokenParameters (
+                       SecurityBindingElement element,
+                       bool requireCancellation,
+                       object dummy)
+               {
+                       this.element = element;
+                       this.cancellable = requireCancellation;
+               }
+#endif
 
                protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters source)
                        : base (source)
                {
                        this.element = (SecurityBindingElement) source.element.Clone ();
                        this.cancellable = source.cancellable;
+#if !MOBILE && !XAMMAC_4_5
                        this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
+#endif
                }
 
                public bool RequireCancellation {
@@ -108,9 +131,11 @@ namespace System.ServiceModel.Security.Tokens
                        set { element = value; }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public ChannelProtectionRequirements BootstrapProtectionRequirements {
                        get { return requirements; }
                }
+#endif
 
                // SecurityTokenParameters
 
@@ -135,13 +160,13 @@ namespace System.ServiceModel.Security.Tokens
                        return new SecureConversationSecurityTokenParameters (this);
                }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
                        SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
                {
                        throw new NotImplementedException ();
                }
-
                [MonoTODO]
                protected internal override void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
                {
@@ -154,6 +179,7 @@ namespace System.ServiceModel.Security.Tokens
                        requirement.Properties [ReqType.IssuedSecurityTokenParametersProperty] = this.Clone ();
                        requirement.KeyType = SecurityKeyType.SymmetricKey;
                }
+#endif
 
                public override string ToString ()
                {
index f4c3f3ceff5a6800cacb46b187c7478b8743f97f..c5ff1439e0c7f37719ecdad155965abd4ee76832 100644 (file)
 // 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.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
 using System.Text;
@@ -114,6 +117,7 @@ namespace System.ServiceModel.Security.Tokens
 
                protected abstract SecurityTokenParameters CloneCore ();
 
+#if !MOBILE && !XAMMAC_4_5
                protected abstract SecurityKeyIdentifierClause CreateKeyIdentifierClause (
                        SecurityToken token, SecurityTokenReferenceStyle referenceStyle);
 
@@ -125,11 +129,13 @@ namespace System.ServiceModel.Security.Tokens
                }
 
                protected internal abstract void InitializeSecurityTokenRequirement (SecurityTokenRequirement requirement);
+#endif
 
                internal BindingContext IssuerBindingContext {
                        set { issuer_binding_context = value; }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                internal void CallInitializeSecurityTokenRequirement (SecurityTokenRequirement requirement)
                {
                        if (issuer_binding_context != null)
@@ -145,5 +151,6 @@ namespace System.ServiceModel.Security.Tokens
                {
                        throw new NotImplementedException ();
                }
+#endif
        }
 }
index 8a40a61c0cd2b8accfac5bbdcaa5202c44d33355..46f14360654c6e604d775af18b399764511d0e95 100644 (file)
 // 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.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Security;
 
 namespace System.ServiceModel.Security.Tokens
@@ -64,6 +66,7 @@ namespace System.ServiceModel.Security.Tokens
                        return new UserNameSecurityTokenParameters (this);
                }
 
+#if !MOBILE && !XAMMAC_4_5
                protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause (
                        SecurityToken token, SecurityTokenReferenceStyle referenceStyle)
                {
@@ -81,5 +84,6 @@ namespace System.ServiceModel.Security.Tokens
                        requirement.TokenType = SecurityTokenTypes.UserName;
                        requirement.RequireCryptographicToken = true;
                }
+#endif
        }
 }
index 20a6a2cbf7a52679a036e6fe605796aeb812ad6d..8e54cb5c622cfbb4f2f7f328292feb1605ee3d24 100644 (file)
@@ -1004,6 +1004,7 @@ System.ServiceModel/BasicHttpBinding_4_5.cs
 System.ServiceModel/BasicHttpsBinding.cs
 System.ServiceModel/BasicHttpsSecurity.cs
 System.ServiceModel/NetHttpBinding.cs
+System.ServiceModel/NetHttpsBinding.cs
 System.ServiceModel/NetHttpMessageEncoding.cs
 System.ServiceModel.Channels/CompressionFormat.cs
 System.ServiceModel.Channels/WebSocketTransportSettings.cs
index e6a96dac52a1aa8de552250e70c59d34746a3f66..21e66a4f65b462670d2c38ea5b0ee018943b6617 100644 (file)
@@ -79,6 +79,7 @@ namespace System.ServiceModel
 
                public BasicHttpsSecurity Security {
                        get { return security; }
+                       set { security = value; }
                }
 
                public override BindingElementCollection
index c5c870c0f33bab17acdd90c7abb679154715d5ea..de946ceb4438a36f6b46123621d978905dbef2eb 100644 (file)
@@ -64,6 +64,7 @@ namespace System.ServiceModel
 
                public HttpTransportSecurity Transport {
                        get { return transport; }
+                       set { transport = value; }
                }
        }
 }
index f392be8d37a35301c25f086c22b6fadd764a0838..5a5ca874df89227a7a85248491c5e48d55c64dab 100644 (file)
@@ -29,7 +29,9 @@ using System;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+#if !MOBILE && !XAMMAC_4_5
 using System.Transactions;
+#endif
 
 namespace System.ServiceModel
 {
@@ -45,7 +47,9 @@ namespace System.ServiceModel
                        MaxItemsInObjectGraph = 0x10000;
                        UseSynchronizationContext = true;
                        ValidateMustUnderstand = true;
+#if !MOBILE && !XAMMAC_4_5
                        TransactionIsolationLevel = IsolationLevel.Unspecified;
+#endif
                }
 
                [MonoTODO]
@@ -63,8 +67,10 @@ namespace System.ServiceModel
                [MonoTODO]
                public int MaxItemsInObjectGraph { get; set; }
 
+#if !MOBILE && !XAMMAC_4_5
                [MonoTODO]
                public IsolationLevel TransactionIsolationLevel { get; set; }
+#endif
 
                [MonoTODO]
                public string TransactionTimeout { get; set; }
index b5ac514b0dae3d7f843a5f3420c58c615c997bbe..9c9b76aec61ac33aae7400c40f01df1c6004c1b3 100644 (file)
@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Claims;
+#endif
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Xml;
@@ -37,6 +39,7 @@ namespace System.ServiceModel
 {
        public class DnsEndpointIdentity : EndpointIdentity
        {
+#if !MOBILE && !XAMMAC_4_5
                public DnsEndpointIdentity (Claim identity)
                {
                        Initialize (identity);
@@ -46,5 +49,11 @@ namespace System.ServiceModel
                        : this (Claim.CreateDnsClaim (dns))
                {
                }
+#else
+               public DnsEndpointIdentity (string dns)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
        }
 }
index e72ab9b8d2b73ad82948de307b075a957cb9b518..01336d803a50be8a40a7d2015c5358837439d86f 100644 (file)
@@ -217,8 +217,11 @@ namespace System.ServiceModel
                        // no special magic), we have to use different approach
                        // that should work either.
                        object proxy = Activator.CreateInstance (type, new object [] {Endpoint, this, address, via});
-#else
+#elif !MOBILE && !XAMMAC_4_5
                        object proxy = new ClientRealProxy (typeof (TChannel), new DuplexClientRuntimeChannel (Endpoint, this, address, via), true).GetTransparentProxy ();
+#else
+                       object proxy;
+                       throw new NotImplementedException ();
 #endif
 
                        ((IDuplexContextChannel) proxy).CallbackInstance = callbackInstance;
index 4ed2088711e1760886a1207a414ddbc40083b940..8852d3d12789695b217a7059173e5754e1e6dbae 100644 (file)
@@ -110,7 +110,7 @@ namespace System.ServiceModel
                        set { reader_quotas = value; }
                }
 
-               public override abstract string Scheme {
+               public override string Scheme {
                        get;
                }
 
index c7852cd1ffd101b441baf7913e28ae1a5b599d5f..6e9a794ee410eac05f81e9e169c62677090b9800 100644 (file)
@@ -31,22 +31,28 @@ namespace System.ServiceModel
 {
        public sealed class MessageSecurityOverTcp
        {
+#if !MOBILE && !XAMMAC_4_5
                SecurityAlgorithmSuite alg_suite;
+#endif
                MessageCredentialType client_credential_type;
 
                internal MessageSecurityOverTcp ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        alg_suite = SecurityAlgorithmSuite.Default;
+#endif
                        // This default value is *silly* but anyways
                        // such code that does not change this ClientCredentialType 
                        // won't work on Mono.
                        client_credential_type = MessageCredentialType.Windows;
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public SecurityAlgorithmSuite AlgorithmSuite {
                        get { return alg_suite; }
                        set { alg_suite = value; }
                }
+#endif
 
                public MessageCredentialType ClientCredentialType {
                        get { return client_credential_type; }
index 2f53bc57b670acb2a596e194a713f628c10352f1..d6a5e19d2866f530af0ba4e4775e1518dfae89a6 100644 (file)
 //
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+#endif
 using System.ServiceModel.Description;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Security;
@@ -38,6 +40,7 @@ namespace System.ServiceModel
 {
        public abstract class MessageSecurityVersion
        {
+#if !MOBILE && !XAMMAC_4_5
                // Types
                class MessageSecurityTokenVersion : SecurityTokenVersion
                {
@@ -112,6 +115,7 @@ namespace System.ServiceModel
                                        SecureConversationVersion = SecureConversationVersion.WSSecureConversationFeb2005;
                                        TrustVersion = TrustVersion.WSTrustFeb2005;
                                }
+                               this.SecurityVersion = wss11 ? SecurityVersion.WSSecurity11 : SecurityVersion.WSSecurity10;
                        }
 
                        public override BasicSecurityProfileVersion BasicSecurityProfileVersion {
@@ -122,14 +126,11 @@ namespace System.ServiceModel
                                get { return MessageSecurityTokenVersion.GetVersion (wss11, basic_profile); }
                        }
 
-                       public override SecurityVersion SecurityVersion {
-                               get { return wss11 ? SecurityVersion.WSSecurity11 : SecurityVersion.WSSecurity10; }
-                       }
-
                        public override SecurityPolicyVersion SecurityPolicyVersion {
                                get { return use2007 ? SecurityPolicyVersion.WSSecurityPolicy12 : SecurityPolicyVersion.WSSecurityPolicy11; }
                        }
                }
+#endif
 
                // Static members
 
@@ -137,12 +138,16 @@ namespace System.ServiceModel
 
                static MessageSecurityVersion ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        wss10_basic = new MessageSecurityVersionImpl (false, true, false);
                        wss11 = new MessageSecurityVersionImpl (true, false, false);
                        wss11_basic = new MessageSecurityVersionImpl (true, true, false);
                        wss10_2007_basic = new MessageSecurityVersionImpl (false, true, true);
                        wss11_2007_basic = new MessageSecurityVersionImpl (true, true, true);
                        wss11_2007 = new MessageSecurityVersionImpl (true, false, true);
+#else
+                       throw new NotImplementedException ();
+#endif
                }
 
                public static MessageSecurityVersion Default {
@@ -183,9 +188,11 @@ namespace System.ServiceModel
 
                public abstract BasicSecurityProfileVersion BasicSecurityProfileVersion { get; }
 
+#if !MOBILE && !XAMMAC_4_5
                public abstract SecurityTokenVersion SecurityTokenVersion { get; }
+#endif
 
-               public abstract SecurityVersion SecurityVersion { get; }
+               public SecurityVersion SecurityVersion { get; internal set; }
 
                public SecureConversationVersion SecureConversationVersion { get; internal set; }
 
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetHttpsBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetHttpsBinding.cs
new file mode 100644 (file)
index 0000000..703de22
--- /dev/null
@@ -0,0 +1,83 @@
+// Authors:
+//      Martin Baulig (martin.baulig@xamarin.com)
+//
+// Copyright 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.ServiceModel.Channels;
+
+namespace System.ServiceModel {
+       [MonoTODO]
+       public class NetHttpsBinding : HttpBindingBase {
+               public NetHttpsBinding ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpsBinding (BasicHttpsSecurityMode securityMode)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpsBinding (string configurationName)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpsBinding (
+                       BasicHttpsSecurityMode securityMode, bool reliableSessionEnabled)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public NetHttpMessageEncoding MessageEncoding { get; set; }
+               public OptionalReliableSession ReliableSession { get; set; }
+               public BasicHttpsSecurity Security { get; set; }
+
+               public WebSocketTransportSettings WebSocketSettings {
+                       get { throw new NotImplementedException (); }
+               }
+               
+               public override string Scheme {
+                       get { throw new NotImplementedException (); }
+               }
+               
+               public override BindingElementCollection CreateBindingElements ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public bool ShouldSerializeReliableSession ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public bool ShouldSerializeSecurity ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               
+               
+       }
+}
\ No newline at end of file
index 794445155d8eefa93a107137ba23439db5470f6f..51a8c3cfb2e1a370984e7885dcbe52a4e76e6acb 100644 (file)
@@ -46,7 +46,9 @@ namespace System.ServiceModel
                XmlDictionaryReaderQuotas reader_quotas
                        = new XmlDictionaryReaderQuotas ();
                bool transaction_flow;
+#if !MOBILE && !XAMMAC_4_5
                TransactionProtocol transaction_protocol;
+#endif
                TcpTransportBindingElement transport;
 
                public NetTcpBinding ()
@@ -69,9 +71,13 @@ namespace System.ServiceModel
                public NetTcpBinding (string configurationName)
                        : this ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        var bindingsSection = ConfigUtil.BindingsSection;
                        var el = bindingsSection.NetTcpBinding.Bindings [configurationName];
                        el.ApplyConfiguration (this);
+#else
+                       throw new NotImplementedException ();
+#endif
                }
 
                internal NetTcpBinding (TcpTransportBindingElement transport,
@@ -147,10 +153,12 @@ namespace System.ServiceModel
                        set { transaction_flow = value; }
                }
 
+#if !MOBILE && !XAMMAC_4_5
                public TransactionProtocol TransactionProtocol {
                        get { return transaction_protocol; }
                        set { transaction_protocol = value; }
                }
+#endif
 
                // overrides
 
@@ -160,18 +168,22 @@ namespace System.ServiceModel
 
                public override BindingElementCollection CreateBindingElements ()
                {
+#if !MOBILE && !XAMMAC_4_5
                        BindingElement tx = new TransactionFlowBindingElement (TransactionProtocol.WSAtomicTransactionOctober2004);
                        SecurityBindingElement sec = CreateMessageSecurity ();
+#endif
                        var msg = new BinaryMessageEncodingBindingElement ();
                        if (ReaderQuotas != null)
                                ReaderQuotas.CopyTo (msg.ReaderQuotas);
                        var trsec = CreateTransportSecurity ();
                        BindingElement tr = GetTransport ();
                        List<BindingElement> list = new List<BindingElement> ();
+#if !MOBILE && !XAMMAC_4_5
                        if (tx != null)
                                list.Add (tx);
                        if (sec != null)
                                list.Add (sec);
+#endif
                        list.Add (msg);
                        if (trsec != null)
                                list.Add (trsec);
@@ -184,6 +196,7 @@ namespace System.ServiceModel
                        return transport.Clone ();
                }
 
+#if !MOBILE && !XAMMAC_4_5
                // It is problematic, but there is no option to disable establishing security context in this binding unlike WSHttpBinding...
                SecurityBindingElement CreateMessageSecurity ()
                {
@@ -239,6 +252,7 @@ namespace System.ServiceModel
                                // FIXME: requireCancellation
                                element, true, reqs);
                }
+#endif
 
                BindingElement CreateTransportSecurity ()
                {
index d93be038818e9fd64c2b59b5163c26a0b5cd0dd1..396579fd2555c54aab9803f9eb3b90604c0dd641 100644 (file)
@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Claims;
+#endif
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Xml;
@@ -37,6 +39,7 @@ namespace System.ServiceModel
 {
        public class SpnEndpointIdentity : EndpointIdentity
        {
+#if !MOBILE && !XAMMAC_4_5
                public SpnEndpointIdentity (Claim identity)
                {
                        Initialize (identity);
@@ -46,6 +49,12 @@ namespace System.ServiceModel
                        : this (Claim.CreateSpnClaim (spn))
                {
                }
+#else
+               public SpnEndpointIdentity (string spn)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
 
                [MonoTODO]
                public static TimeSpan SpnLookupTime {
index a866e93e4cba737f0cf73f35f9057650ca72e204..e53d72009a66a6c7591354242e2b7d8a20997dfb 100644 (file)
@@ -27,7 +27,9 @@
 //
 using System;
 using System.Collections.Generic;
+#if !MOBILE && !XAMMAC_4_5
 using System.IdentityModel.Claims;
+#endif
 using System.Security.Cryptography;
 using System.Security.Cryptography.X509Certificates;
 using System.Xml;
@@ -37,6 +39,7 @@ namespace System.ServiceModel
 {
        public class UpnEndpointIdentity : EndpointIdentity
        {
+#if !MOBILE && !XAMMAC_4_5
                public UpnEndpointIdentity (Claim identity)
                {
                        Initialize (identity);
@@ -46,5 +49,11 @@ namespace System.ServiceModel
                        : this (Claim.CreateUpnClaim (upn))
                {
                }
+#else
+               public UpnEndpointIdentity (string upn)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
        }
 }
index 1b83c9e468e3dcf353b7c59bab5da5ee28079337..6666c86e4845d1fa077bba9db397905c2ad291fc 100644 (file)
@@ -187,6 +187,7 @@ System.ServiceModel/BasicHttpSecurity.cs
 System.ServiceModel/BasicHttpMessageSecurity.cs
 System.ServiceModel/BasicHttpsBinding.cs
 System.ServiceModel/BasicHttpsSecurity.cs
+System.ServiceModel/CallbackBehaviorAttribute.cs
 System.ServiceModel/ChannelFactory.cs
 System.ServiceModel/ChannelFactory_1.cs
 System.ServiceModel/ClientBase.cs
@@ -200,6 +201,8 @@ System.ServiceModel/Constants.cs
 System.ServiceModel/DataContractFormatAttribute.cs
 System.ServiceModel/DefaultCommunicationTimeouts.cs
 System.ServiceModel/Dummy.cs
+System.ServiceModel/DuplexClientBase.cs
+System.ServiceModel/DuplexChannelFactory.cs
 System.ServiceModel/EndpointAddress.cs
 System.ServiceModel/EndpointAddress10.cs
 System.ServiceModel/EndpointAddressBuilder.cs
@@ -218,6 +221,7 @@ System.ServiceModel/IClientChannel.cs
 System.ServiceModel/ICommunicationObject.cs
 System.ServiceModel/IContextChannel.cs
 System.ServiceModel/IDefaultCommunicationTimeouts.cs
+System.ServiceModel/IDuplexClientChannel.cs
 System.ServiceModel/IExtensibleObject.cs
 System.ServiceModel/IExtension.cs
 System.ServiceModel/IExtensionCollection.cs
@@ -233,6 +237,7 @@ System.ServiceModel/MessageHeader_1.cs
 System.ServiceModel/MessageParameterAttribute.cs
 System.ServiceModel/MessagePropertyAttribute.cs
 System.ServiceModel/NetHttpBinding.cs
+System.ServiceModel/NetHttpsBinding.cs
 System.ServiceModel/NetHttpMessageEncoding.cs
 System.ServiceModel/OperationContext.cs
 System.ServiceModel/OperationContextScope.cs
@@ -255,3 +260,30 @@ Dummy_2_1.cs
 System.ServiceModel/XmlSerializerFormatAttribute.cs
 System.ServiceModel.Description/XmlSerializerOperationBehavior.cs
 System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs
+
+System.ServiceModel.Channels/ConnectionOrientedTransportBindingElement.cs
+System.ServiceModel.Channels/SslStreamSecurityBindingElement.cs
+System.ServiceModel.Channels/TcpConnectionPoolSettings.cs
+System.ServiceModel.Channels/TcpTransportBindingElement.cs
+System.ServiceModel.Channels/WindowsStreamSecurityBindingElement.cs
+
+System.ServiceModel/MessageSecurityOverTcp.cs
+System.ServiceModel/NetTcpBinding.cs
+System.ServiceModel/NetTcpSecurity.cs
+System.ServiceModel/TcpTransportSecurity.cs
+System.ServiceModel/DnsEndpointIdentity.cs
+System.ServiceModel/SpnEndpointIdentity.cs
+System.ServiceModel/UpnEndpointIdentity.cs
+System.ServiceModel/MessageSecurityVersion.cs
+
+System.ServiceModel.Security/BasicSecurityProfileVersion.cs
+System.ServiceModel.Security/SecurityVersion.cs
+System.ServiceModel.Security/TrustVersion.cs
+System.ServiceModel.Security/SecureConversationVersion.cs
+System.ServiceModel.Security/SecurityPolicyVersion.cs
+
+System.ServiceModel.Security.Tokens/SecurityTokenParameters.cs
+System.ServiceModel.Security.Tokens/SecurityTokenReferenceStyle.cs
+System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
+System.ServiceModel.Security.Tokens/SupportingTokenParameters.cs
+System.ServiceModel.Security.Tokens/UserNameSecurityTokenParameters.cs
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/Assembly/AssemblyInfo.cs b/mcs/class/System.Xml.XPath.XmlDocument/Assembly/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..a34208a
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.Xml.XPath.XmlDocument.dll")]
+[assembly: AssemblyDescription ("System.Xml.XPath.XmlDocument.dll")]
+[assembly: AssemblyDefaultAlias ("System.Xml.XPath.XmlDocument.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../msfinal.pub")]
+
+[assembly: SecurityCritical]
+
+[assembly: ComVisible (false)]
\ No newline at end of file
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/Makefile b/mcs/class/System.Xml.XPath.XmlDocument/Makefile
new file mode 100644 (file)
index 0000000..504b374
--- /dev/null
@@ -0,0 +1,11 @@
+thisdir = class/System.Xml.XPath.XmlDocument
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Xml.XPath.XmlDocument.dll
+LIB_REFS = System System.Xml
+LIB_MCS_FLAGS =
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.dll.sources b/mcs/class/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.dll.sources
new file mode 100644 (file)
index 0000000..c5813ec
--- /dev/null
@@ -0,0 +1,5 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Xml/XmlDocumentXPathExtensions.cs
diff --git a/mcs/class/System.Xml.XPath.XmlDocument/System.Xml/XmlDocumentXPathExtensions.cs b/mcs/class/System.Xml.XPath.XmlDocument/System.Xml/XmlDocumentXPathExtensions.cs
new file mode 100644 (file)
index 0000000..ee4968b
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// XmlDocumentXPathExtensions.cs
+//
+// Author:
+//   Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (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.
+//
+
+namespace System.Xml
+{
+       public static class XmlDocumentXPathExtensions
+       {
+               [MonoTODO]
+               public static XmlNodeList SelectNodes (this XmlNode node, string xpath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XmlNodeList SelectNodes (this XmlNode node, string xpath, XmlNamespaceManager nsmgr)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XmlNode SelectSingleNode (this XmlNode node, string xpath)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XmlNode SelectSingleNode (this XmlNode node, string xpath, XmlNamespaceManager nsmgr)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.XPathNavigator CreateNavigator (this XmlNode node)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.IXPathNavigable ToXPathNavigable (this XmlNode node)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.XPathNavigator CreateNavigator (this XmlDocument document)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static XPath.XPathNavigator CreateNavigator (this XmlDocument document, XmlNode node)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
diff --git a/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs b/mcs/class/System/System.IO/FileSystemWatcher_mobile.cs
new file mode 100644 (file)
index 0000000..aa13ac5
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// FileSystemWatcher.cs
+//
+// Authors:
+//  Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.IO
+{
+    public class FileSystemWatcher
+    {
+        public FileSystemWatcher () { throw new NotImplementedException (); }
+        public FileSystemWatcher (string path) { throw new NotImplementedException (); }
+        public FileSystemWatcher (string path, string filter) { throw new NotImplementedException (); }
+        public bool EnableRaisingEvents { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
+        public string Filter { get { throw new NotImplementedException (); } set { } }
+        public bool IncludeSubdirectories { get { throw new NotImplementedException (); } set { } }
+        public int InternalBufferSize { get { throw new NotImplementedException (); } set { } }
+        public NotifyFilters NotifyFilter { get { throw new NotImplementedException (); } set { } }
+        public string Path { get { throw new NotImplementedException (); } set { } }
+        public event FileSystemEventHandler Changed;
+        public event FileSystemEventHandler Created;
+        public event FileSystemEventHandler Deleted;
+        public event ErrorEventHandler Error;
+        public event RenamedEventHandler Renamed;
+        protected void OnChanged (FileSystemEventArgs e) { throw new NotImplementedException (); }
+        protected void OnCreated (FileSystemEventArgs e) { throw new NotImplementedException (); }
+        protected void OnDeleted (System.IO.FileSystemEventArgs e) { throw new NotImplementedException (); }
+        protected void OnError (ErrorEventArgs e) { throw new NotImplementedException (); }
+        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 (); }
+    }
+}
\ No newline at end of file
index c89f2de39a2d6a61c6e72ba6eac4e51819477a7a..d6621207cecd34e1278c86df276e0d3572bf0bc9 100644 (file)
@@ -38,12 +38,12 @@ namespace System.Net.WebSockets
                EndpointUnavailable = 1001,
                ProtocolError = 1002,
                InvalidMessageType = 1003,
-               Empty,
+               Empty = 1005,
                InvalidPayloadData = 1007,
                PolicyViolation = 1008,
-               MessageTooBig = 1004,
+               MessageTooBig = 1009,
                MandatoryExtension = 1010,
-               InternalServerError
+               InternalServerError = 1011
        }
 }
 
index ec341ea85e244436a9725551e3f4007f87ec962c..8aecd6542a6c56734efd9f48dd4c8f9bfd359d37 100644 (file)
@@ -32,8 +32,8 @@ namespace System.Security.Authentication.ExtendedProtection
 {
        public enum ChannelBindingKind
        {
-               Unknown,
-               Unique,
-               Endpoint
+               Unknown = 0,
+               Unique = 25,
+               Endpoint = 26
        }
 }
index 9dbb7e79b4f799f60a2bd35e79c50c055fd11420..4bba90982fe0c99561ba941382dd329f38592230 100644 (file)
@@ -28,6 +28,16 @@ System.IO.Compression/DeflateStream.cs
 System.IO.Compression/GZipStream.cs
 System.IO/InternalBufferOverflowException.cs
 System.IO/InvalidDataException.cs
+System.IO/ErrorEventArgs.cs
+System.IO/ErrorEventHandler.cs
+System.IO/FileSystemEventArgs.cs
+System.IO/FileSystemEventHandler.cs
+System.IO/FileSystemWatcher_mobile.cs
+System.IO/NotifyFilters.cs
+System.IO/RenamedEventArgs.cs
+System.IO/RenamedEventHandler.cs
+System.IO/WaitForChangedResult.cs
+System.IO/WatcherChangeTypes.cs
 System.Net.Mail/AlternateView.cs
 System.Net.Mail/AlternateViewCollection.cs
 System.Net.Mail/Attachment.cs
index 778ccf34afc34668fe8feb487db0e33da659fc74..343e818ace85c71ec45c8bb4126d5a96222bc71d 100644 (file)
@@ -29,8 +29,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 using System.Runtime.InteropServices;
 
@@ -137,5 +135,3 @@ namespace Microsoft.Win32
        }
 }
 
-#endif // NET_2_1
-
index aa5e9d99276de0264ee927a2aa964fc146d85b92..922e78009efdc4da3e5d5ea0e6d6232bac3dbe5e 100644 (file)
@@ -27,8 +27,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 using System.Runtime.InteropServices;
 
@@ -51,5 +49,3 @@ namespace Microsoft.Win32
 
 }
 
-#endif // NET_2_1
-
index 623efdf77bb6b309704afbe6c72bfbe7b91df5b1..a0f30146c82b61f35df9fa048c0f5f31cfadf689 100644 (file)
@@ -29,8 +29,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 using System.IO;
 using System.Collections;
@@ -44,6 +42,50 @@ using Microsoft.Win32.SafeHandles;
 
 namespace Microsoft.Win32
 {
+
+#if MOBILE
+       public sealed class RegistryKey : IDisposable
+       {
+               internal RegistryKey (RegistryHive hiveId)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void Dispose ()
+               {
+               }
+
+               public RegistryKey CreateSubKey (string subkey)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public object GetValue (string name, object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public static object GetValue (string keyName, string valueName, object defaultValue)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public RegistryKey OpenSubKey (string name, bool writable)
+               {
+                       throw new PlatformNotSupportedException ();
+               }
+
+               public void SetValue (string name, object value)
+               {
+               }
+
+               public void SetValue (string name, object value, RegistryValueKind valueKind)
+               {
+               }
+
+               // TODO: Finish full contract API
+       }
+#else
        /// <summary>
        ///     Wrapper class for Windows Registry Entry.
        /// </summary>
@@ -693,7 +735,6 @@ namespace Microsoft.Win32
                }
 
        }
+#endif
 }
 
-#endif // NET_2_1
-
index 38f5c23026eb8f89d7d01d5c13e499727ed6ed07..8db4a861b56761f0163f81df7042064bbc332218 100644 (file)
@@ -25,8 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System.Runtime.InteropServices;
 
 namespace Microsoft.Win32
@@ -44,5 +42,3 @@ namespace Microsoft.Win32
        }
 }
 
-#endif // NET_2_1
-
index 98d4f3ec325c9a08d042822a4733fe6a369820d8..54f16378f3072e43e1510b0b5ad358fd74ba7f80 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !NET_2_1
-
 using System;
 
 namespace Microsoft.Win32
@@ -39,5 +37,3 @@ namespace Microsoft.Win32
        }
 }
 
-#endif // NET_2_1
-
index 405d346a5275f4ca9ca6dc19a826f22452a10924..0872f01977ad44dbd72aad695444439c989a2e57 100644 (file)
@@ -33,6 +33,12 @@ namespace System.Diagnostics.Tracing
 {
        public class EventSource : IDisposable
        {
+               protected internal struct EventData
+               {
+                       public IntPtr DataPointer { get; set; }
+                       public int Size { get; set; }
+               }
+
                protected EventSource ()
                {
                        this.Name = this.GetType().Name;
index b755b4d5091913e9896dffce497d314bb1419236..8b4a3504d3ad2c16973c0b1c33babe286981b7ba 100644 (file)
@@ -127,12 +127,22 @@ namespace System.Globalization
                        get {
                                return Thread.CurrentThread.CurrentCulture;
                        }
+#if NETSTANDARD
+                       set {
+                               throw new NotImplementedException ();
+                       }
+#endif
                }
 
                public static CultureInfo CurrentUICulture { 
                        get {
                                return Thread.CurrentThread.CurrentUICulture;
                        }
+#if NETSTANDARD
+                       set {
+                               throw new NotImplementedException ();
+                       }
+#endif
                }
 
                internal static CultureInfo ConstructCurrentCulture ()
index 8a852c139420c3622ba6fac9f39eaf1e6d6d1463..133ff0be6d9424193e985ed48fd265721648970d 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -87,5 +86,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-
-#endif
index e6cdf10b73785b36f1489c055c1de78dbf98cab8..aa3453d20069185d4d7e8abaf1ed258b6aab6f10 100644 (file)
@@ -26,8 +26,6 @@
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
-
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -151,4 +149,3 @@ namespace System.Reflection.Emit {
                }
        }
 } 
-#endif
index 1163869317e9ab7c8d7c75055c6b8dd4a655e18e..67ddad4a581323bc34bab0f11809093484e2224f 100644 (file)
@@ -1,4 +1,3 @@
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 namespace System.Reflection.Emit {
        static class OpCodeNames {
                internal static readonly string [] names = {
@@ -309,4 +308,3 @@ namespace System.Reflection.Emit {
                };
        }
 }
-#endif
index df0cbf0d50a659499d30f18e21268913b6ad4597..c50e574bde82417420d35eeb1f3fe13579459372 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -75,4 +74,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-#endif
index 6e891d538d45ed3dfc59083402a6d1074f450df2..03317d2626f5da094b1f6d8d504192fd19532f52 100644 (file)
@@ -1,4 +1,3 @@
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -929,4 +928,3 @@ namespace System.Reflection.Emit {
                }
        }
 }
-#endif
index 2985b1b57ee0b5679081e19791641a0e738a8e79..4d823d33cbe8a3c154a0d63077d3592aa01bc391 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -112,5 +111,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-
-#endif
index 08052a3386e7344b5e141c5746eaa0c0351f6af9..ad6be1d1d74a4f0dcc22d469046289c0bc5cd826 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -70,6 +69,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-
-
-#endif
index 16a271495926aa4e1fd61c990b76076dc7b89328..524ea8d30598e57bda0c07b0a2b2c21381f3b615 100644 (file)
@@ -25,7 +25,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if !FULL_AOT_RUNTIME || IOS_REFLECTION
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -153,4 +152,3 @@ namespace System.Reflection.Emit {
        }
 
 }
-#endif
diff --git a/mcs/class/corlib/System.Reflection.Metadata/AssemblyExtensions.cs b/mcs/class/corlib/System.Reflection.Metadata/AssemblyExtensions.cs
new file mode 100644 (file)
index 0000000..19da043
--- /dev/null
@@ -0,0 +1,46 @@
+//
+// AssemblyExtensions.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Reflection.Metadata
+{
+       public static class AssemblyExtensions
+       {
+               //
+               // System.Runtime.Loader netstandard typeforwarders dependency
+               //
+               [CLSCompliant(false)]
+               public unsafe static bool TryGetRawMetadata (this System.Reflection.Assembly assembly, out byte* blob, out int length)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index 9da34563f241ccf3e575df1e5acc425dfae28f90..42006c3e80f99ce9594cecccc582d21a1b0fc395 100644 (file)
@@ -433,6 +433,11 @@ namespace System.Reflection {
                        get {
                                return (cultureinfo == null)? null : cultureinfo.Name;
                        }
+#if NETSTANDARD
+                       set {
+                               throw new NotImplementedException ();
+                       }
+#endif
                }
 
                [ComVisibleAttribute(false)]
diff --git a/mcs/class/corlib/System.Runtime.Loader/AssemblyLoadContext.cs b/mcs/class/corlib/System.Runtime.Loader/AssemblyLoadContext.cs
new file mode 100644 (file)
index 0000000..1839144
--- /dev/null
@@ -0,0 +1,108 @@
+//
+// AssemblyLoadContext.cs
+//
+// Authors:
+//     Marek Safar  <marek.safar@gmail.com>
+//
+// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NETSTANDARD
+
+namespace System.Runtime.Loader
+{
+       //
+       // System.Runtime.Loader netstandard typeforwarders dependency
+       //
+       public abstract class AssemblyLoadContext
+       {
+               protected AssemblyLoadContext ()
+               {
+               }
+               
+               public static System.Runtime.Loader.AssemblyLoadContext Default { 
+                       get { 
+                               throw new NotImplementedException ();
+                       }
+               }
+               
+               public static System.Reflection.AssemblyName GetAssemblyName (string assemblyPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public static AssemblyLoadContext GetLoadContext (System.Reflection.Assembly assembly) 
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected abstract System.Reflection.Assembly Load (System.Reflection.AssemblyName assemblyName);
+               
+               public System.Reflection.Assembly LoadFromAssemblyName(System.Reflection.AssemblyName assemblyName) 
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public System.Reflection.Assembly LoadFromAssemblyPath (string assemblyPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public System.Reflection.Assembly LoadFromNativeImagePath (string nativeImagePath, string assemblyPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               public System.Reflection.Assembly LoadFromStream (System.IO.Stream assembly)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public System.Reflection.Assembly LoadFromStream (System.IO.Stream assembly, System.IO.Stream assemblySymbols) 
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected IntPtr LoadUnmanagedDllFromPath (string unmanagedDllPath)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               protected virtual IntPtr LoadUnmanagedDll (string unmanagedDllName)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public void SetProfileOptimizationRoot (string directoryPath)
+               {
+               }
+
+               public void StartProfileOptimization (string profile)
+               {               
+               }
+
+               public event Func<AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly> Resolving;
+               public event Action<AssemblyLoadContext> Unloading;
+       }
+}
+
+#endif
\ No newline at end of file
index e037132ba7d6d68f3ef6106f4e5e142497579218..1419dea79edd94d11e69acf8d297f169d411a4ec 100644 (file)
@@ -307,6 +307,7 @@ System.Reflection.Emit/StringToken.cs
 System.Reflection.Emit/TypeBuilder.cs
 System.Reflection.Emit/TypeToken.cs
 System.Reflection.Emit/UnmanagedMarshal.cs
+System.Reflection.Metadata/AssemblyExtensions.cs
 System.Resources/Win32Resources.cs
 System.Runtime/GCLargeObjectHeapCompactionMode.cs
 System.Runtime/GCLatencyMode.cs
@@ -601,6 +602,7 @@ System.Runtime.Remoting.Proxies/ProxyAttribute.cs
 System.Runtime.Remoting.Services/EnterpriseServicesHelper.cs
 System.Runtime.Remoting.Services/ITrackingHandler.cs
 System.Runtime.Remoting.Services/TrackingServices.cs
+System.Runtime.Loader/AssemblyLoadContext.cs
 System.Runtime.Versioning/CompatibilitySwitch.cs
 System.Security/CodeAccessPermission.cs
 System.Security/HostProtectionException.cs
index 48a8467961fc1469cf2dc4f686f29c934b992b07..b0586886a1bde8a8283666ad4e2b02ca40036163 100644 (file)
@@ -59,7 +59,7 @@ namespace System.Security.Cryptography {
             public const string Sha512 = "SHA512";              // BCRYPT_SHA512_ALGORITHM
             internal const string Rsa = "RSA";                  // BCRYPT_RSA_ALGORITHM
         }
-
+#if !MONO
         /// <summary>
         ///     Well known key blob tyes
         /// </summary>
@@ -454,5 +454,6 @@ namespace System.Security.Cryptography {
             }
             return keyBlob;
         }
+#endif
     }
 }
index 13ea41c2fb2d1139c2a85ba87ff23820744baf10..46870878014e49cf142570cd30922c6cac788540 100644 (file)
@@ -31,6 +31,10 @@ namespace System.Security.Cryptography {
     /// </summary>
     [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
     public sealed class CngKey : IDisposable {
+#if MONO
+        public void Dispose() {
+        }
+#else
         private SafeNCryptKeyHandle m_keyHandle;
         private SafeNCryptProviderHandle m_kspHandle;
 
@@ -816,5 +820,6 @@ namespace System.Security.Cryptography {
             Contract.Assert(m_keyHandle != null);
             NCryptNative.SetProperty(m_keyHandle, property.Name, property.Value, property.Options);
         }
+#endif
     }
 }
index 40505e30ddbe9c6773aa447b759e3854ea195df4..c1f169ead6a2b4e72053c146499efc852c9e4f9e 100644 (file)
@@ -18,6 +18,15 @@ namespace System.Security.Cryptography {
     /// </summary>
     [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
     public sealed class ECDsaCng : ECDsa {
+#if MONO
+        public override byte[] SignHash(byte[] hash) {
+            throw new NotImplementedException();
+        }
+
+        public override bool VerifyHash(byte[] hash, byte[] signature) {
+            throw new NotImplementedException();
+        }
+#else
         private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(256, 384, 128), new KeySizes(521, 521, 0) };
 
         private CngKey m_key;
@@ -407,5 +416,6 @@ namespace System.Security.Cryptography {
                 return hasher.HashFinal();
             }
         }
+    #endif
     }
 }
index cf56209111a9c171735eacd0a6f0e074366cdfb8..8807a434240c1c3509fef6b7d2de5bf2aceb7a1b 100644 (file)
@@ -8,7 +8,9 @@ using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
+#if !MONO
 using System.Numerics;
+#endif
 using System.Runtime.CompilerServices;
 using System.Runtime.ConstrainedExecution;
 using System.Runtime.InteropServices;
@@ -100,7 +102,7 @@ namespace System.Security.Cryptography {
         ProtectKey = 0x00000001,                        // NCRYPT_UI_PROTECT_KEY_FLAG    
         ForceHighProtection = 0x00000002                // NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG
     }
-
+#if !MONO
     /// <summary>
     ///     Native interop with CNG's NCrypt layer. Native definitions are in ncrypt.h
     /// </summary>
@@ -1741,4 +1743,5 @@ namespace System.Security.Cryptography {
             return error == ErrorCode.Success;
         }
     }
+#endif
 }
index 3085b90e249ff54818d0129dc44c4a6548f73da6..842c40428e97dcde94e29ad0fcdc05a741aa0c0d 100644 (file)
@@ -10,6 +10,18 @@ namespace System.Security.Cryptography
 {
     public sealed class RSACng : RSA
     {
+#if MONO
+        public override RSAParameters ExportParameters(bool includePrivateParameters)
+        {
+            throw new NotImplementedException();
+        }
+
+        public override void ImportParameters(RSAParameters parameters)
+        {
+            throw new NotImplementedException();
+        }
+#else
+
         // See https://msdn.microsoft.com/en-us/library/windows/desktop/bb931354(v=vs.85).aspx
         private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(512, 16384, 64) };
 
@@ -504,5 +516,6 @@ namespace System.Security.Cryptography
                  throw new CryptographicException(SR.GetString(SR.Cryptography_UnsupportedPaddingMode));
             }
         }
+#endif
     }
 }
index 8fe2784485220399c0646210de60a119268d78bc..0f4cd7c2d9586858916282c108fd1890ae2fb3a0 100644 (file)
@@ -78,10 +78,11 @@ namespace Xamarin.ApiDiff {
                public  static  bool    IgnoreVirtualChanges        { get; set; }
                public  static  bool    IgnoreAddedPropertySetters  { get; set; }
 
+               public static bool IgnoreNonbreaking { get; set; }
+
                public static bool Lax;
                public static bool Colorize = true;
        }
-
        class Program {
 
                public static int Main (string[] args)
@@ -120,7 +121,8 @@ namespace Xamarin.ApiDiff {
                                        v => State.IgnoreVirtualChanges = v != null
                                },
                                { "c|colorize:", "Colorize HTML output", v => State.Colorize = string.IsNullOrEmpty (v) ? true : bool.Parse (v) },
-                               { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true }
+                               { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true },
+                               { "ignore-nonbreaking", "Ignore all nonbreaking changes", v => State.IgnoreNonbreaking = true }
                        };
 
                        try {
@@ -130,6 +132,13 @@ namespace Xamarin.ApiDiff {
                                showHelp = true;
                        }
 
+                       if (State.IgnoreNonbreaking) {
+                               State.IgnoreAddedPropertySetters = true;
+                               State.IgnoreVirtualChanges = true;
+                               State.IgnoreNew.Add (new Regex (".*"));
+                               State.IgnoreAdded.Add (new Regex (".*"));
+                       }
+
                        if (showHelp || extra == null || extra.Count < 2 || extra.Count > 3) {
                                Console.WriteLine (@"Usage: mono-api-html [options] <reference.xml> <assembly.xml> [diff.html]");
                                Console.WriteLine ();
@@ -253,9 +262,11 @@ namespace Xamarin.ApiDiff {
                                                        } else {
                                                                file.WriteLine ("<h1>{0}.dll vs {1}.dll</h1>", ac.SourceAssembly, ac.TargetAssembly);
                                                        }
-                                                       file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>");
-                                                       file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>");
-                                                       file.WriteLine ("<br/>");
+                                                       if (!State.IgnoreNonbreaking) {
+                                                               file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>");
+                                                               file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>");
+                                                               file.WriteLine ("<br/>");
+                                                       }
                                                        file.WriteLine ("<div data-is-topmost>");
                                                        file.Write (diffHtml);
                                                        file.WriteLine ("</div> <!-- end topmost div -->");
index a3399fbef04e5b731cfeb8277176f2a0705752e5..f6cf940c9e41c63eeb8ad5f6cb9f0fae6a16c52d 100644 (file)
@@ -198,6 +198,20 @@ namespace Xamarin.ApiDiff {
                        Indent ().WriteLine ("}");
                }
 
+               //HACK: we don't have hierarchy information here so just check some basic heuristics for now
+               bool IsBaseChangeCompatible (string source, string target)
+               {
+                       if (source == "System.Object")
+                               return true;
+                       if (source == "System.Exception" && target.EndsWith ("Exception", StringComparison.Ordinal))
+                               return true;
+                       if (source == "System.EventArgs" && target.EndsWith ("EventArgs", StringComparison.Ordinal))
+                               return true;
+                       if (source == "System.Runtime.InteropServices.SafeHandle" && target.StartsWith ("Microsoft.Win32.SafeHandles.SafeHandle", StringComparison.Ordinal))
+                               return true;
+                       return false;
+               }
+
                public override void Modified (XElement source, XElement target, ApiChanges diff)
                {
                        // hack - there could be changes that we're not monitoring (e.g. attributes properties)
@@ -206,7 +220,7 @@ namespace Xamarin.ApiDiff {
 
                        var sb = source.GetAttribute ("base");
                        var tb = target.GetAttribute ("base");
-                       if (sb != tb) {
+                       if (sb != tb && !(State.IgnoreNonbreaking && IsBaseChangeCompatible (sb, tb))) {
                                Output.Write ("Modified base type: ");
                                Output.WriteLine (new ApiChange ().AppendModified (sb, tb, true).Member.ToString ());
                        }
index a2b0225b4480856d2c1497bcb761c67b1abb2a33..f292eee22ddadfdbb051439c9e11c5a205ddd5f2 100644 (file)
@@ -45,14 +45,16 @@ namespace Xamarin.ApiDiff {
 
                void RenderFieldAttributes (FieldAttributes source, FieldAttributes target, ApiChange change)
                {
-                       var srcNotSerialized = (source & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
-                       var tgtNotSerialized = (target & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
-                       if (srcNotSerialized != tgtNotSerialized) {
-                               // this is not a breaking change, so only render it if it changed.
-                               if (srcNotSerialized) {
-                                       change.AppendRemoved ("[NonSerialized]\n");
-                               } else {
-                                       change.AppendAdded ("[NonSerialized]\n");
+                       if (!State.IgnoreNonbreaking) {
+                               var srcNotSerialized = (source & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
+                               var tgtNotSerialized = (target & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
+                               if (srcNotSerialized != tgtNotSerialized) {
+                                       // this is not a breaking change, so only render it if it changed.
+                                       if (srcNotSerialized) {
+                                               change.AppendRemoved ("[NonSerialized]\n");
+                                       } else {
+                                               change.AppendAdded ("[NonSerialized]\n");
+                                       }
                                }
                        }
 
index d12d86625c2ea7a0af1b5d4bbb8067bd32ed04e1..9da6edc106d5e91eedaef5e5c4c59e295d8ef8cc 100644 (file)
@@ -138,9 +138,13 @@ namespace Xamarin.ApiDiff {
                void Modify (ApiChanges modified)
                {
                        foreach (var changes in modified) {
+                               if (State.IgnoreNonbreaking && changes.Value.All (c => !c.Breaking))
+                                       continue;
                                Output.WriteLine ("<p>{0}:</p>", changes.Key);
                                Output.WriteLine ("<pre>");
                                foreach (var element in changes.Value) {
+                                       if (State.IgnoreNonbreaking && !element.Breaking)
+                                               continue;
                                        Output.Write ("<div {0}>", element.Breaking ? "data-is-breaking" : "data-is-non-breaking");
                                        foreach (var line in element.Member.ToString ().Split ('\n'))
                                                Output.WriteLine ("\t{0}", line);
@@ -158,6 +162,8 @@ namespace Xamarin.ApiDiff {
                                if (State.IgnoreRemoved.Any (re => re.IsMatch (GetDescription (item))))
                                        continue;
                                SetContext (item);
+                               if (State.IgnoreNonbreaking && !IsBreakingRemoval (item))
+                                       continue;
                                if (!r) {
                                        BeforeRemoving (elements);
                                        r = true;