diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj index b51ed5c2fc..63c00cc6d6 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -418,6 +418,7 @@ + diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/AdapterUtil.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/AdapterUtil.cs index c6fb8e610f..a0657da1e8 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/AdapterUtil.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/AdapterUtil.cs @@ -2135,6 +2135,11 @@ static internal Exception InvalidArgumentValue(string methodName) return Argument(StringsHelper.GetString(Strings.ADP_InvalidArgumentValue, methodName)); } + // + // : SNI + // + internal static PlatformNotSupportedException SNIPlatformNotSupported(string platform) => new(StringsHelper.GetString(Strings.SNI_PlatformNotSupportedNetFx, platform)); + // global constant strings internal const string Append = "Append"; internal const string BeginExecuteNonQuery = "BeginExecuteNonQuery"; diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeManagedWrapperARM64.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeManagedWrapperARM64.cs new file mode 100644 index 0000000000..9f63e5a899 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeManagedWrapperARM64.cs @@ -0,0 +1,150 @@ +// 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.Runtime.InteropServices; +using System.Text; +using static Microsoft.Data.SqlClient.SNINativeMethodWrapper; + +namespace Microsoft.Data.SqlClient +{ + internal static class SNINativeManagedWrapperARM64 + { + private const string SNI = "Microsoft.Data.SqlClient.SNI.arm64.dll"; + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIAddProviderWrapper")] + internal static extern uint SNIAddProvider(SNIHandle pConn, ProviderEnum ProvNum, [In] ref uint pInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIAddProviderWrapper")] + internal static extern uint SNIAddProviderWrapper(SNIHandle pConn, ProviderEnum ProvNum, [In] ref SNICTAIPProviderInfo pInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIAddProviderWrapper")] + internal static extern uint SNIAddProviderWrapper(SNIHandle pConn, ProviderEnum ProvNum, [In] ref AuthProviderInfo pInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNICheckConnectionWrapper")] + internal static extern uint SNICheckConnection([In] SNIHandle pConn); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNICloseWrapper")] + internal static extern uint SNIClose(IntPtr pConn); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern void SNIGetLastError(out SNI_Error pErrorStruct); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern void SNIPacketRelease(IntPtr pPacket); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIPacketResetWrapper")] + internal static extern void SNIPacketReset([In] SNIHandle pConn, IOType IOType, SNIPacket pPacket, ConsumerNumber ConsNum); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIQueryInfo(QTypes QType, ref uint pbQInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIQueryInfo(QTypes QType, ref IntPtr pbQInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIReadAsyncWrapper")] + internal static extern uint SNIReadAsync(SNIHandle pConn, ref IntPtr ppNewPacket); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIReadSyncOverAsync(SNIHandle pConn, ref IntPtr ppNewPacket, int timeout); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIRemoveProviderWrapper")] + internal static extern uint SNIRemoveProvider(SNIHandle pConn, ProviderEnum ProvNum); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNISecInitPackage(ref uint pcbMaxToken); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNISetInfoWrapper")] + internal static extern uint SNISetInfo(SNIHandle pConn, QTypes QType, [In] ref uint pbQInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNITerminate(); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIWaitForSSLHandshakeToCompleteWrapper")] + internal static extern uint SNIWaitForSSLHandshakeToComplete([In] SNIHandle pConn, int dwMilliseconds, out uint pProtocolVersion); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint UnmanagedIsTokenRestricted([In] IntPtr token, [MarshalAs(UnmanagedType.Bool)] out bool isRestricted); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint GetSniMaxComposedSpnLength(); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out Guid pbQInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, [MarshalAs(UnmanagedType.Bool)] out bool pbQInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, ref IntPtr pbQInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out ushort portNum); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)] + internal static extern uint SNIGetPeerAddrStrWrapper([In] SNIHandle pConn, int bufferSize, StringBuilder addrBuffer, out uint addrLen); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out ProviderEnum provNum); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIInitialize")] + internal static extern uint SNIInitialize([In] IntPtr pmo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIOpenSyncExWrapper(ref SNI_CLIENT_CONSUMER_INFO pClientConsumerInfo, out IntPtr ppConn); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIOpenWrapper( + [In] ref Sni_Consumer_Info pConsumerInfo, + [MarshalAs(UnmanagedType.LPWStr)] string szConnect, + [In] SNIHandle pConn, + out IntPtr ppConn, + [MarshalAs(UnmanagedType.Bool)] bool fSync, + SqlConnectionIPAddressPreference ipPreference, + [In] ref SNI_DNSCache_Info pDNSCachedInfo); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern IntPtr SNIPacketAllocateWrapper([In] SafeHandle pConn, IOType IOType); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIPacketGetDataWrapper([In] IntPtr packet, [In, Out] byte[] readBuffer, uint readBufferLength, out uint dataSize); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern unsafe void SNIPacketSetData(SNIPacket pPacket, [In] byte* pbBuf, uint cbBuf); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNISecGenClientContextWrapper")] + internal static extern unsafe uint SNISecGenClientContextWrapper( + [In] SNIHandle pConn, + [In, Out] byte[] pIn, + uint cbIn, + [In, Out] byte[] pOut, + [In] ref uint pcbOut, + [MarshalAsAttribute(UnmanagedType.Bool)] out bool pfDone, + byte* szServerInfo, + uint cbServerInfo, + [MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszUserName, + [MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszPassword); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIWriteAsyncWrapper(SNIHandle pConn, [In] SNIPacket pPacket); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern uint SNIWriteSyncOverAsync(SNIHandle pConn, [In] SNIPacket pPacket); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl)] + internal static extern IntPtr SNIClientCertificateFallbackWrapper(IntPtr pCallbackContext); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIServerEnumOpenWrapper")] + internal static extern IntPtr SNIServerEnumOpen(); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIServerEnumCloseWrapper")] + internal static extern void SNIServerEnumClose([In] IntPtr packet); + + [DllImport(SNI, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SNIServerEnumReadWrapper", CharSet = CharSet.Unicode)] + internal static extern int SNIServerEnumRead([In] IntPtr packet, + [In, Out][MarshalAs(UnmanagedType.LPArray)] char[] readBuffer, + [In] int bufferLength, + [MarshalAs(UnmanagedType.Bool)] out bool more); + } +} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeMethodWrapper.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeMethodWrapper.cs index 19dd12587a..37e387de03 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeMethodWrapper.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop/SNINativeMethodWrapper.cs @@ -4,7 +4,6 @@ using System; using System.Diagnostics; -using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; @@ -20,7 +19,8 @@ namespace Microsoft.Data.SqlClient internal static class SNINativeMethodWrapper { private static int s_sniMaxComposedSpnLength = -1; - private static readonly bool s_is64bitProcess = Environment.Is64BitProcess; + private static readonly System.Runtime.InteropServices.Architecture s_architecture = + System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture; private const int SniOpenTimeOut = -1; // infinite @@ -397,206 +397,416 @@ internal struct SNI_Error internal static uint SNIAddProvider(SNIHandle pConn, ProviderEnum ProvNum, [In] ref uint pInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIAddProvider(pConn, ProvNum, ref pInfo) : - SNINativeManagedWrapperX86.SNIAddProvider(pConn, ProvNum, ref pInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIAddProvider(pConn, ProvNum, ref pInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIAddProvider(pConn, ProvNum, ref pInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIAddProvider(pConn, ProvNum, ref pInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIAddProviderWrapper(SNIHandle pConn, ProviderEnum ProvNum, [In] ref SNICTAIPProviderInfo pInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo) : - SNINativeManagedWrapperX86.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIAddProviderWrapper(SNIHandle pConn, ProviderEnum ProvNum, [In] ref AuthProviderInfo pInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo) : - SNINativeManagedWrapperX86.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIAddProviderWrapper(pConn, ProvNum, ref pInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNICheckConnection([In] SNIHandle pConn) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNICheckConnection(pConn) : - SNINativeManagedWrapperX86.SNICheckConnection(pConn); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNICheckConnection(pConn); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNICheckConnection(pConn); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNICheckConnection(pConn); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIClose(IntPtr pConn) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIClose(pConn) : - SNINativeManagedWrapperX86.SNIClose(pConn); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIClose(pConn); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIClose(pConn); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIClose(pConn); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static void SNIGetLastError(out SNI_Error pErrorStruct) { - if (s_is64bitProcess) + switch (s_architecture) { - SNINativeManagedWrapperX64.SNIGetLastError(out pErrorStruct); - } - else - { - SNINativeManagedWrapperX86.SNIGetLastError(out pErrorStruct); + case System.Runtime.InteropServices.Architecture.Arm64: + SNINativeManagedWrapperARM64.SNIGetLastError(out pErrorStruct); + break; + case System.Runtime.InteropServices.Architecture.X64: + SNINativeManagedWrapperX64.SNIGetLastError(out pErrorStruct); + break; + case System.Runtime.InteropServices.Architecture.X86: + SNINativeManagedWrapperX86.SNIGetLastError(out pErrorStruct); + break; + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); } } internal static void SNIPacketRelease(IntPtr pPacket) { - if (s_is64bitProcess) + switch (s_architecture) { - SNINativeManagedWrapperX64.SNIPacketRelease(pPacket); - } - else - { - SNINativeManagedWrapperX86.SNIPacketRelease(pPacket); + case System.Runtime.InteropServices.Architecture.Arm64: + SNINativeManagedWrapperARM64.SNIPacketRelease(pPacket); + break; + case System.Runtime.InteropServices.Architecture.X64: + SNINativeManagedWrapperX64.SNIPacketRelease(pPacket); + break; + case System.Runtime.InteropServices.Architecture.X86: + SNINativeManagedWrapperX86.SNIPacketRelease(pPacket); + break; + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); } } internal static void SNIPacketReset([In] SNIHandle pConn, IOType IOType, SNIPacket pPacket, ConsumerNumber ConsNum) { - if (s_is64bitProcess) - { - SNINativeManagedWrapperX64.SNIPacketReset(pConn, IOType, pPacket, ConsNum); - } - else + switch (s_architecture) { - SNINativeManagedWrapperX86.SNIPacketReset(pConn, IOType, pPacket, ConsNum); + case System.Runtime.InteropServices.Architecture.Arm64: + SNINativeManagedWrapperARM64.SNIPacketReset(pConn, IOType, pPacket, ConsNum); + break; + case System.Runtime.InteropServices.Architecture.X64: + SNINativeManagedWrapperX64.SNIPacketReset(pConn, IOType, pPacket, ConsNum); + break; + case System.Runtime.InteropServices.Architecture.X86: + SNINativeManagedWrapperX86.SNIPacketReset(pConn, IOType, pPacket, ConsNum); + break; + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); } } internal static uint SNIQueryInfo(QTypes QType, ref uint pbQInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIQueryInfo(QType, ref pbQInfo) : - SNINativeManagedWrapperX86.SNIQueryInfo(QType, ref pbQInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIQueryInfo(QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIQueryInfo(QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIQueryInfo(QType, ref pbQInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIQueryInfo(QTypes QType, ref IntPtr pbQInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIQueryInfo(QType, ref pbQInfo) : - SNINativeManagedWrapperX86.SNIQueryInfo(QType, ref pbQInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIQueryInfo(QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIQueryInfo(QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIQueryInfo(QType, ref pbQInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIReadAsync(SNIHandle pConn, ref IntPtr ppNewPacket) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIReadAsync(pConn, ref ppNewPacket) : - SNINativeManagedWrapperX86.SNIReadAsync(pConn, ref ppNewPacket); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIReadAsync(pConn, ref ppNewPacket); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIReadAsync(pConn, ref ppNewPacket); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIReadAsync(pConn, ref ppNewPacket); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIReadSyncOverAsync(SNIHandle pConn, ref IntPtr ppNewPacket, int timeout) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout) : - SNINativeManagedWrapperX86.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIRemoveProvider(SNIHandle pConn, ProviderEnum ProvNum) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIRemoveProvider(pConn, ProvNum) : - SNINativeManagedWrapperX86.SNIRemoveProvider(pConn, ProvNum); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIRemoveProvider(pConn, ProvNum); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIRemoveProvider(pConn, ProvNum); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIRemoveProvider(pConn, ProvNum); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNISecInitPackage(ref uint pcbMaxToken) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNISecInitPackage(ref pcbMaxToken) : - SNINativeManagedWrapperX86.SNISecInitPackage(ref pcbMaxToken); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNISecInitPackage(ref pcbMaxToken); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNISecInitPackage(ref pcbMaxToken); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNISecInitPackage(ref pcbMaxToken); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNISetInfo(SNIHandle pConn, QTypes QType, [In] ref uint pbQInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNISetInfo(pConn, QType, ref pbQInfo) : - SNINativeManagedWrapperX86.SNISetInfo(pConn, QType, ref pbQInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNISetInfo(pConn, QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNISetInfo(pConn, QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNISetInfo(pConn, QType, ref pbQInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNITerminate() { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNITerminate() : - SNINativeManagedWrapperX86.SNITerminate(); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNITerminate(); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNITerminate(); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNITerminate(); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint SNIWaitForSSLHandshakeToComplete([In] SNIHandle pConn, int dwMilliseconds, out uint pProtocolVersion) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion) : - SNINativeManagedWrapperX86.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } internal static uint UnmanagedIsTokenRestricted([In] IntPtr token, [MarshalAs(UnmanagedType.Bool)] out bool isRestricted) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.UnmanagedIsTokenRestricted(token, out isRestricted) : - SNINativeManagedWrapperX86.UnmanagedIsTokenRestricted(token, out isRestricted); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.UnmanagedIsTokenRestricted(token, out isRestricted); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.UnmanagedIsTokenRestricted(token, out isRestricted); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.UnmanagedIsTokenRestricted(token, out isRestricted); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint GetSniMaxComposedSpnLength() { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.GetSniMaxComposedSpnLength() : - SNINativeManagedWrapperX86.GetSniMaxComposedSpnLength(); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.GetSniMaxComposedSpnLength(); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.GetSniMaxComposedSpnLength(); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.GetSniMaxComposedSpnLength(); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out Guid pbQInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out pbQInfo) : - SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, [MarshalAs(UnmanagedType.Bool)] out bool pbQInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out pbQInfo) : - SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out pbQInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, ref IntPtr pbQInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, ref pbQInfo) : - SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, ref pbQInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIGetInfoWrapper(pConn, QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, ref pbQInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, ref pbQInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out ushort portNum) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out portNum) : - SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out portNum); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIGetInfoWrapper(pConn, QType, out portNum); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out portNum); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out portNum); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIGetPeerAddrStrWrapper([In] SNIHandle pConn, int bufferSize, StringBuilder addrBuffer, out uint addrLen) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen) : - SNINativeManagedWrapperX86.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out ProviderEnum provNum) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out provNum) : - SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out provNum); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIGetInfoWrapper(pConn, QType, out provNum); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out provNum); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out provNum); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIInitialize([In] IntPtr pmo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIInitialize(pmo) : - SNINativeManagedWrapperX86.SNIInitialize(pmo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIInitialize(pmo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIInitialize(pmo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIInitialize(pmo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIOpenSyncExWrapper(ref SNI_CLIENT_CONSUMER_INFO pClientConsumerInfo, out IntPtr ppConn) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn) : - SNINativeManagedWrapperX86.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIOpenWrapper( @@ -608,34 +818,64 @@ private static uint SNIOpenWrapper( SqlConnectionIPAddressPreference ipPreference, [In] ref SNI_DNSCache_Info pDNSCachedInfo) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo) : - SNINativeManagedWrapperX86.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static IntPtr SNIPacketAllocateWrapper([In] SafeHandle pConn, IOType IOType) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIPacketAllocateWrapper(pConn, IOType) : - SNINativeManagedWrapperX86.SNIPacketAllocateWrapper(pConn, IOType); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIPacketAllocateWrapper(pConn, IOType); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIPacketAllocateWrapper(pConn, IOType); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIPacketAllocateWrapper(pConn, IOType); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIPacketGetDataWrapper([In] IntPtr packet, [In, Out] byte[] readBuffer, uint readBufferLength, out uint dataSize) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize) : - SNINativeManagedWrapperX86.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static unsafe void SNIPacketSetData(SNIPacket pPacket, [In] byte* pbBuf, uint cbBuf) { - if (s_is64bitProcess) - { - SNINativeManagedWrapperX64.SNIPacketSetData(pPacket, pbBuf, cbBuf); - } - else + switch (s_architecture) { - SNINativeManagedWrapperX86.SNIPacketSetData(pPacket, pbBuf, cbBuf); + case System.Runtime.InteropServices.Architecture.Arm64: + SNINativeManagedWrapperARM64.SNIPacketSetData(pPacket, pbBuf, cbBuf); + break; + case System.Runtime.InteropServices.Architecture.X64: + SNINativeManagedWrapperX64.SNIPacketSetData(pPacket, pbBuf, cbBuf); + break; + case System.Runtime.InteropServices.Architecture.X86: + SNINativeManagedWrapperX86.SNIPacketSetData(pPacket, pbBuf, cbBuf); + break; + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); } } @@ -651,30 +891,62 @@ private static unsafe uint SNISecGenClientContextWrapper( [MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszUserName, [MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszPassword) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword) : - SNINativeManagedWrapperX86.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIWriteAsyncWrapper(SNIHandle pConn, [In] SNIPacket pPacket) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIWriteAsyncWrapper(pConn, pPacket) : - SNINativeManagedWrapperX86.SNIWriteAsyncWrapper(pConn, pPacket); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIWriteAsyncWrapper(pConn, pPacket); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIWriteAsyncWrapper(pConn, pPacket); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIWriteAsyncWrapper(pConn, pPacket); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static uint SNIWriteSyncOverAsync(SNIHandle pConn, [In] SNIPacket pPacket) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIWriteSyncOverAsync(pConn, pPacket) : - SNINativeManagedWrapperX86.SNIWriteSyncOverAsync(pConn, pPacket); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIWriteSyncOverAsync(pConn, pPacket); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIWriteSyncOverAsync(pConn, pPacket); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIWriteSyncOverAsync(pConn, pPacket); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } private static IntPtr SNIClientCertificateFallbackWrapper(IntPtr pCallbackContext) { - return s_is64bitProcess ? - SNINativeManagedWrapperX64.SNIClientCertificateFallbackWrapper(pCallbackContext) : - SNINativeManagedWrapperX86.SNIClientCertificateFallbackWrapper(pCallbackContext); + switch (s_architecture) + { + case System.Runtime.InteropServices.Architecture.Arm64: + return SNINativeManagedWrapperARM64.SNIClientCertificateFallbackWrapper(pCallbackContext); + case System.Runtime.InteropServices.Architecture.X64: + return SNINativeManagedWrapperX64.SNIClientCertificateFallbackWrapper(pCallbackContext); + case System.Runtime.InteropServices.Architecture.X86: + return SNINativeManagedWrapperX86.SNIClientCertificateFallbackWrapper(pCallbackContext); + default: + throw ADP.SNIPlatformNotSupported(s_architecture.ToString()); + } } #endregion diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.Designer.cs b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.Designer.cs index c6d6a23107..91538ec7dc 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.Designer.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.Designer.cs @@ -8639,6 +8639,15 @@ internal static string SNI_ERROR_9 { return ResourceManager.GetString("SNI_ERROR_9", resourceCulture); } } + + /// + /// Looks up a localized string similar to The '{0}' platform is not supported when targeting .NET Framework.. + /// + internal static string SNI_PlatformNotSupportedNetFx { + get { + return ResourceManager.GetString("SNI_PlatformNotSupportedNetFx", resourceCulture); + } + } /// /// Looks up a localized string similar to HTTP Provider. diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.de.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.de.resx index e543a92be0..fe3f64e758 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.de.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.de.resx @@ -4617,4 +4617,7 @@ Timeout bei der Verbindung beim Abrufen eines Zugriffstokens mithilfe der Authentifizierungsmethode "{0}". Letzter Fehler: {1}: {2} + + Die Plattform "{0}" wird bei .NET Framework nicht unterstützt. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.es.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.es.resx index 893e402df0..2f1f9e046c 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.es.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.es.resx @@ -4617,4 +4617,7 @@ Se agotó el tiempo de espera de la conexión al recuperar un token de acceso mediante el método de autenticación "{0}". Último error: {1}: {2} + + La plataforma '{0}' no se admite cuando el destino es .NET Framework. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.fr.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.fr.resx index b4da5e5293..a8d6ed4fa6 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.fr.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.fr.resx @@ -4617,4 +4617,7 @@ La connexion a expiré lors de la récupération d’un jeton d’accès à l’aide de '{0}' méthode d’authentification. Dernière erreur : {1} : {2} + + La plateforme '{0}' n’est pas prise en charge lors du ciblage de .NET Framework. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.it.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.it.resx index 55e6cb37d8..b5154df34c 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.it.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.it.resx @@ -4617,4 +4617,7 @@ Timeout della connessione durante il recupero di un token di accesso tramite il metodo di autenticazione '{0}'. Ultimo errore: {1}: {2} + + La piattaforma '{0}' non è supportata quando la destinazione è .NET Framework. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ja.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ja.resx index 7562513ca7..4aa10d3c93 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ja.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ja.resx @@ -4617,4 +4617,7 @@ 認証方法 '{0}' によるアクセス トークンの取得中に接続がタイムアウトしました。前回のエラー: {1}: {2} + + .NET Framework を対象とする場合、'{0}' プラットフォームはサポートされません。 + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ko.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ko.resx index f151d134e9..2c278bbbac 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ko.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ko.resx @@ -4617,4 +4617,7 @@ '{0}' 인증 방법을 사용하여 액세스 토큰을 검색하는 동안 연결 시간이 초과되었습니다. 마지막 오류: {1}: {2} + + .NET Framework를 대상으로 지정할 때는 '{0}' 플랫폼이 지원되지 않습니다. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.pt-BR.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.pt-BR.resx index 3034a3774d..2a765efbc9 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.pt-BR.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.pt-BR.resx @@ -4617,4 +4617,7 @@ A conexão expirou ao recuperar um token de acesso usando o método de autenticação '{0}'. Último erro: {1}: {2} + + A plataforma '{0}' não é suportada ao direcionar o .NET Framework. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.resx index a8a348745d..61e933ff8b 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.resx @@ -4617,4 +4617,7 @@ Connection timed out while retrieving an access token using '{0}' authentication method. Last error: {1}: {2} + + The '{0}' platform is not supported when targeting .NET Framework. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ru.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ru.resx index b14c0998c4..43f336f953 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ru.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.ru.resx @@ -4617,4 +4617,7 @@ Истекло время ожидания подключения при получении маркера доступа с помощью метода проверки подлинности "{0}". Последняя ошибка: {1}: {2} + + Платформа "{0}" не поддерживается, если целью является .NET Framework. + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hans.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hans.resx index 774e62fe74..c43013aa79 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hans.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hans.resx @@ -4617,4 +4617,7 @@ 使用“{0}”身份验证方法检索访问令牌时连接超时。最后一个错误: {1}: {2} + + 面向 .NET Framework 时,不支持 "{0}" 平台。 + \ No newline at end of file diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hant.resx b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hant.resx index 3e3c251820..fd0404fcda 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hant.resx +++ b/src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.zh-Hant.resx @@ -4617,4 +4617,7 @@ 使用 '{0}' 驗證方法擷取存取權杖時已逾時。上次錯誤: {1}: {2} + + 以.NET Framework 為目標時,不支援 '{0}' 平台。 + \ No newline at end of file diff --git a/tools/props/Versions.props b/tools/props/Versions.props index fd430ad32b..d4b852ab2a 100644 --- a/tools/props/Versions.props +++ b/tools/props/Versions.props @@ -11,7 +11,7 @@ - 3.0.0 + 3.0.1 4.3.1 4.3.0 @@ -29,7 +29,7 @@ 4.7.0 - 3.0.0 + 3.0.1 4.7.0 4.7.0 4.7.0 diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 8f179ccc9e..30071a9095 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -28,7 +28,7 @@ When using NuGet 3.x this package requires at least version 3.4. sqlclient microsoft.data.sqlclient - + @@ -37,7 +37,7 @@ When using NuGet 3.x this package requires at least version 3.4. - + @@ -51,7 +51,7 @@ When using NuGet 3.x this package requires at least version 3.4. - + @@ -65,7 +65,7 @@ When using NuGet 3.x this package requires at least version 3.4. - + @@ -81,7 +81,7 @@ When using NuGet 3.x this package requires at least version 3.4. - +