diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationTimeoutRetryHelper.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationTimeoutRetryHelper.cs index 721e31ca6f..2b05333c88 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationTimeoutRetryHelper.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ActiveDirectoryAuthenticationTimeoutRetryHelper.cs @@ -51,19 +51,19 @@ public ActiveDirectoryAuthenticationTimeoutRetryState State if (value != ActiveDirectoryAuthenticationTimeoutRetryState.Retrying && value != ActiveDirectoryAuthenticationTimeoutRetryState.HasLoggedIn) { - throw new InvalidOperationException($"Cannot transit from {_state} to {value}."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ActiveDirectoryInvalidStateTransition, _state, value)); } break; case ActiveDirectoryAuthenticationTimeoutRetryState.Retrying: if (value != ActiveDirectoryAuthenticationTimeoutRetryState.HasLoggedIn) { - throw new InvalidOperationException($"Cannot transit from {_state} to {value}."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ActiveDirectoryInvalidStateTransition, _state, value)); } break; case ActiveDirectoryAuthenticationTimeoutRetryState.HasLoggedIn: - throw new InvalidOperationException($"Cannot transit from {_state} to {value}."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ActiveDirectoryInvalidStateTransition, _state, value)); default: - throw new InvalidOperationException($"Unsupported state: {value}."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ActiveDirectoryUnsupportedState, value)); } if (_sqlAuthLogger.IsLoggingEnabled) { @@ -133,7 +133,7 @@ private static string GetTokenHash(SqlFedAuthToken token) // Here we mimic how ADAL calculates hash for token. They use UTF8 instead of Unicode. var originalTokenString = Encoding.Unicode.GetString(token.AccessToken); - + var bytesInUtf8 = Encoding.UTF8.GetBytes(originalTokenString); using (var sha256 = SHA256.Create()) { diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs index 62c11705be..8e863cd711 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs @@ -486,8 +486,7 @@ private async Task GetInternalConnection( } catch (ChannelClosedException) { - //TODO: exceptions from resource file - throw new Exception("The connection pool has been shut down."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ConnectionPoolShutDown)); } if (connection is not null && !IsLiveConnection(connection)) diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ConnectionPoolSlots.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ConnectionPoolSlots.cs index d6b36f747f..55eb88f02c 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ConnectionPoolSlots.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ConnectionPoolSlots.cs @@ -132,7 +132,7 @@ internal ConnectionPoolSlots(uint fixedCapacity) } } - throw new InvalidOperationException("Couldn't find an empty slot."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ConnectionPoolNoEmptySlot)); } catch { diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Packet.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Packet.cs index b81270bf08..ac23f2c129 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Packet.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Packet.cs @@ -94,7 +94,7 @@ public int RequiredLength CheckDisposed(); if (!HasDataLength) { - throw new InvalidOperationException($"cannot get {nameof(RequiredLength)} when {nameof(HasDataLength)} is false"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_Packet_RequiredLengthUnavailable)); } return TdsEnums.HEADER_LEN + _dataLength; } diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs index 1dc48e8374..88511a8a00 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicLoader.cs @@ -115,7 +115,7 @@ private static SqlRetryLogicBaseProvider ResolveRetryLogicProvider(string config if (string.IsNullOrEmpty(retryMethod)) { - throw new ArgumentNullException($"Failed to create {nameof(SqlRetryLogicBaseProvider)} object because the {nameof(retryMethod)} value is null or empty."); + throw new ArgumentNullException(nameof(retryMethod), StringsHelper.GetString(Strings.SQLCR_RetryMethodNullOrEmpty)); } Type type = null; @@ -155,7 +155,7 @@ private static SqlRetryLogicBaseProvider ResolveRetryLogicProvider(string config // i.e: Opening a connection or executing a command while invoking a function // runs the application to the `TargetInvocationException`. // And using an isolated zone like a specific AppDomain results in an infinite loop. - throw new Exception($"Exception occurred when running the `{type.FullName}.{retryMethod}()` method.", e); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQLCR_RetryMethodException, type.FullName, retryMethod), e); } SqlClientEventSource.Log.TryTraceEvent(" Unable to resolve a valid provider; Returns `null`.", TypeName, methodName); @@ -180,7 +180,7 @@ private static object CreateInstance( MethodInfo internalMethod = typeof(SqlConfigurableRetryFactory).GetMethod(retryMethodName); if (internalMethod == null) { - throw new InvalidOperationException($"Failed to resolve the '{retryMethodName}' method from `{typeof(SqlConfigurableRetryFactory).FullName}` type."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQLCR_ResolveMethodFailed, retryMethodName, typeof(SqlConfigurableRetryFactory).FullName)); } SqlClientEventSource.Log.TryTraceEvent(" The `{2}.{3}()` method has been discovered as the `{4}` method name." @@ -196,14 +196,14 @@ private static object CreateInstance( MethodInfo method = type.GetMethod(retryMethodName); if (method == null) { - throw new InvalidOperationException($"Failed to resolve the '{retryMethodName}' method from `{type.FullName}` type."); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQLCR_ResolveMethodFailed, retryMethodName, type.FullName)); } SqlClientEventSource.Log.TryTraceEvent(" The `{2}` method metadata has been extracted from the `{3}` type by using the `{4}` method name." , TypeName, methodName, method.Name, type.FullName, retryMethodName); if (!typeof(SqlRetryLogicBaseProvider).IsAssignableFrom(method.ReturnType)) { - throw new InvalidCastException($"Invalid return type; Return type must be of `{typeof(SqlRetryLogicBaseProvider).FullName}` type."); + throw new InvalidCastException(StringsHelper.GetString(Strings.SQLCR_InvalidReturnType, typeof(SqlRetryLogicBaseProvider).FullName)); } SqlClientEventSource.Log.TryTraceEvent(" The return type of the `{2}.{3}()` method is valid." , TypeName, methodName, type.FullName, method.Name); @@ -243,8 +243,7 @@ private static object[] PrepareParamValues(ParameterInfo[] parameterInfos, SqlRe if (!found) { - string message = $"Failed to create {nameof(SqlRetryLogicBaseProvider)} object because of invalid {retryMethod}'s parameters." + - $"{Environment.NewLine}The function must have a paramter of type '{nameof(SqlRetryLogicOption)}'."; + string message = StringsHelper.GetString(Strings.SQLCR_InvalidRetryParameters, retryMethod, Environment.NewLine); throw new InvalidOperationException(message); } } @@ -290,8 +289,7 @@ private static object[] PrepareParamValues(ParameterInfo[] parameterInfos, SqlRe } else { - string message = $"Failed to create {nameof(SqlRetryLogicBaseProvider)} object because of invalid {nameof(retryMethod)}'s parameters." - + $"{Environment.NewLine}Parameter '{paramInfo.ParameterType.Name} {paramInfo.Name}' doesn't have default value."; + string message = StringsHelper.GetString(Strings.SQLCR_InvalidParameterNoDefault, Environment.NewLine, paramInfo.ParameterType.Name, paramInfo.Name); throw new InvalidOperationException(message); } } @@ -416,7 +414,7 @@ private static Type TypeResolver(Assembly arg1, string arg2, bool arg3) { if (result != null) { - throw new InvalidOperationException("Sequence contains more than one matching element"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQLCR_SequenceMoreThanOneMatch)); } result = type; } @@ -424,7 +422,7 @@ private static Type TypeResolver(Assembly arg1, string arg2, bool arg3) } if (result == null) { - throw new InvalidOperationException("Sequence contains no matching element"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQLCR_SequenceNoMatch)); } return result; } diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs index 073f6c2e20..19571c55dc 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs @@ -2923,7 +2923,7 @@ internal byte[] GetBytes(object o, out int maxSize) if (maxSize < -1 || maxSize >= ushort.MaxValue) { - throw new InvalidOperationException(o.GetType() + ": invalid Size"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_InvalidUdtSize, o.GetType().FullName)); } byte[] retval; diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs index 9f0627f623..c76b795416 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.Multiplexer.cs @@ -199,7 +199,7 @@ private void SetPartialPacket(Packet packet) { if (_partialPacket != null && packet != null) { - throw new InvalidOperationException("partial packet cannot be non-null when setting to non=null"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_Multiplexer_PartialPacketNotNull)); } _partialPacket = packet; } @@ -488,7 +488,7 @@ out bool recurse if (consumePartialPacket && consumeInputDirectly) { - throw new InvalidOperationException($"MultiplexPackets cannot return both {nameof(consumePartialPacket)} and {nameof(consumeInputDirectly)}"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_Multiplexer_ConflictingConsumeModes)); } } diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs index c8aa34ed54..cf8d6cd524 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs @@ -3493,7 +3493,7 @@ internal TdsOperationStatus TryReadNetworkPacket() #if DEBUG if (s_failAsyncPends) { - throw new InvalidOperationException("Attempted to pend a read when s_failAsyncPends test hook was enabled"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_FailAsyncPendsEnabled)); } if (s_forceSyncOverAsyncAfterFirstPend) { @@ -4869,7 +4869,7 @@ partial void CheckDebugDataHashImpl() { if (Buffer != null && Read > 0) { - throw new InvalidOperationException("Packet modification detected. Hash is null but packet contains non-null buffer"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_PacketHashNullWithNonNullBuffer)); } } else @@ -4884,7 +4884,7 @@ partial void CheckDebugDataHashImpl() { if (Hash[index] != checkHash[index]) { - throw new InvalidOperationException("Packet modification detected. Hash from packet creation does not match hash from packet check"); + throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_PacketHashMismatch)); } } } diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Utilities/ObjectPool.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Utilities/ObjectPool.cs index a3b8c11cff..2ea573d0b3 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Utilities/ObjectPool.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Utilities/ObjectPool.cs @@ -33,7 +33,7 @@ public T Rent() return item; } - return _onCreate?.Invoke() ?? throw new InvalidOperationException("Can only rent from a pool if an onCreate delegate is available"); + return _onCreate?.Invoke() ?? throw new InvalidOperationException(StringsHelper.GetString(Strings.SQL_ObjectPoolNoCreateDelegate)); } public bool TryGet(out T item) diff --git a/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs b/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs index 8d54324b8a..f06b0686a4 100644 --- a/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs +++ b/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs @@ -13785,5 +13785,185 @@ internal static string Xml_ValueOutOfRange { return ResourceManager.GetString("Xml_ValueOutOfRange", resourceCulture); } } + + /// + /// Looks up a localized string similar to Could not find an empty slot in the connection pool.. + /// + internal static string SQL_ConnectionPoolNoEmptySlot { + get { + return ResourceManager.GetString("SQL_ConnectionPoolNoEmptySlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The connection pool has been shut down.. + /// + internal static string SQL_ConnectionPoolShutDown { + get { + return ResourceManager.GetString("SQL_ConnectionPoolShutDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get RequiredLength when HasDataLength is false.. + /// + internal static string SQL_Packet_RequiredLengthUnavailable { + get { + return ResourceManager.GetString("SQL_Packet_RequiredLengthUnavailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Partial packet cannot be non-null when setting to non-null.. + /// + internal static string SQL_Multiplexer_PartialPacketNotNull { + get { + return ResourceManager.GetString("SQL_Multiplexer_PartialPacketNotNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MultiplexPackets cannot return both consumePartialPacket and consumeInputDirectly.. + /// + internal static string SQL_Multiplexer_ConflictingConsumeModes { + get { + return ResourceManager.GetString("SQL_Multiplexer_ConflictingConsumeModes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Attempted to pend a read when the fail async pends test hook was enabled.. + /// + internal static string SQL_FailAsyncPendsEnabled { + get { + return ResourceManager.GetString("SQL_FailAsyncPendsEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Packet modification detected. Hash is null but packet contains non-null buffer.. + /// + internal static string SQL_PacketHashNullWithNonNullBuffer { + get { + return ResourceManager.GetString("SQL_PacketHashNullWithNonNullBuffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Packet modification detected. Hash from packet creation does not match hash from packet check.. + /// + internal static string SQL_PacketHashMismatch { + get { + return ResourceManager.GetString("SQL_PacketHashMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot transition from state '{0}' to '{1}'.. + /// + internal static string SQL_ActiveDirectoryInvalidStateTransition { + get { + return ResourceManager.GetString("SQL_ActiveDirectoryInvalidStateTransition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unsupported state: '{0}'.. + /// + internal static string SQL_ActiveDirectoryUnsupportedState { + get { + return ResourceManager.GetString("SQL_ActiveDirectoryUnsupportedState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create SqlRetryLogicBaseProvider object because the retryMethod value is null or empty.. + /// + internal static string SQLCR_RetryMethodNullOrEmpty { + get { + return ResourceManager.GetString("SQLCR_RetryMethodNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exception occurred when running the '{0}.{1}()' method.. + /// + internal static string SQLCR_RetryMethodException { + get { + return ResourceManager.GetString("SQLCR_RetryMethodException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to resolve the '{0}' method from '{1}' type.. + /// + internal static string SQLCR_ResolveMethodFailed { + get { + return ResourceManager.GetString("SQLCR_ResolveMethodFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid return type; return type must be of '{0}' type.. + /// + internal static string SQLCR_InvalidReturnType { + get { + return ResourceManager.GetString("SQLCR_InvalidReturnType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create SqlRetryLogicBaseProvider object because of invalid '{0}' parameters.{1}The function must have a parameter of type 'SqlRetryLogicOption'.. + /// + internal static string SQLCR_InvalidRetryParameters { + get { + return ResourceManager.GetString("SQLCR_InvalidRetryParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create SqlRetryLogicBaseProvider object because of invalid retryMethod parameters.{0}Parameter '{1} {2}' doesn't have a default value.. + /// + internal static string SQLCR_InvalidParameterNoDefault { + get { + return ResourceManager.GetString("SQLCR_InvalidParameterNoDefault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sequence contains more than one matching element.. + /// + internal static string SQLCR_SequenceMoreThanOneMatch { + get { + return ResourceManager.GetString("SQLCR_SequenceMoreThanOneMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sequence contains no matching element.. + /// + internal static string SQLCR_SequenceNoMatch { + get { + return ResourceManager.GetString("SQLCR_SequenceNoMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can only rent from a pool if an onCreate delegate is available.. + /// + internal static string SQL_ObjectPoolNoCreateDelegate { + get { + return ResourceManager.GetString("SQL_ObjectPoolNoCreateDelegate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type '{0}' has an invalid size.. + /// + internal static string SQL_InvalidUdtSize { + get { + return ResourceManager.GetString("SQL_InvalidUdtSize", resourceCulture); + } + } } } diff --git a/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx b/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx index 01fc64c57e..0c5e1006f1 100644 --- a/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx +++ b/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx @@ -1,17 +1,17 @@  - @@ -4686,4 +4686,64 @@ {0} Invalid JSON string for vector. + + Could not find an empty slot in the connection pool. + + + The connection pool has been shut down. + + + Cannot get RequiredLength when HasDataLength is false. + + + Partial packet cannot be non-null when setting to non-null. + + + MultiplexPackets cannot return both consumePartialPacket and consumeInputDirectly. + + + Attempted to pend a read when the fail async pends test hook was enabled. + + + Packet modification detected. Hash is null but packet contains non-null buffer. + + + Packet modification detected. Hash from packet creation does not match hash from packet check. + + + Cannot transition from state '{0}' to '{1}'. + + + Unsupported state: '{0}'. + + + Failed to create SqlRetryLogicBaseProvider object because the retryMethod value is null or empty. + + + Exception occurred when running the '{0}.{1}()' method. + + + Failed to resolve the '{0}' method from '{1}' type. + + + Invalid return type; return type must be of '{0}' type. + + + Failed to create SqlRetryLogicBaseProvider object because of invalid '{0}' parameters.{1}The function must have a parameter of type 'SqlRetryLogicOption'. + + + Failed to create SqlRetryLogicBaseProvider object because of invalid retryMethod parameters.{0}Parameter '{1} {2}' doesn't have a default value. + + + Sequence contains more than one matching element. + + + Sequence contains no matching element. + + + Can only rent from a pool if an onCreate delegate is available. + + + The type '{0}' has an invalid size. + diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Packet.TestHarness.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Packet.TestHarness.cs new file mode 100644 index 0000000000..600d9e68b7 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Packet.TestHarness.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Namespace-level stubs for StringsHelper and Strings. +// These are needed because Packet.cs is compiled directly into the test project +// and references StringsHelper (in Microsoft.Data) and Strings (in System). +// The stubs inside TdsParserStateObject are nested and not visible to Packet. + +namespace Microsoft.Data +{ + internal sealed class StringsHelper + { + internal static string GetString(string value) => value; + } +} + +namespace System +{ + internal class Strings + { + internal static string SQL_Packet_RequiredLengthUnavailable = nameof(SQL_Packet_RequiredLengthUnavailable); + } +} diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/TdsParserStateObject.TestHarness.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/TdsParserStateObject.TestHarness.cs index 4e70eaae57..f2eb2b15f4 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/TdsParserStateObject.TestHarness.cs +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/TdsParserStateObject.TestHarness.cs @@ -63,7 +63,8 @@ private class StringsHelper internal class Strings { internal static string SqlMisc_InvalidArraySizeMessage = nameof(SqlMisc_InvalidArraySizeMessage); - + internal static string SQL_Multiplexer_PartialPacketNotNull = nameof(SQL_Multiplexer_PartialPacketNotNull); + internal static string SQL_Multiplexer_ConflictingConsumeModes = nameof(SQL_Multiplexer_ConflictingConsumeModes); } public class Parser