From b92121206feaa3ca2daaea9c9974b47582a2b1bc Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 25 Mar 2025 17:23:55 -0500 Subject: [PATCH 1/3] Split out classes/interfaces from SqlConfigurableRetryLogicManager.cs --- .../src/Microsoft.Data.SqlClient.csproj | 9 +++++++ .../netfx/src/Microsoft.Data.SqlClient.csproj | 9 +++++++ .../IAppContextSwitchOverridesSection.cs | 11 ++++++++ .../ISqlConfigurableRetryCommandSection.cs | 11 ++++++++ .../ISqlConfigurableRetryConnectionSection.cs | 25 +++++++++++++++++++ .../SqlConfigurableRetryLogicManager.cs | 21 ---------------- 6 files changed, 65 insertions(+), 21 deletions(-) create mode 100644 src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/IAppContextSwitchOverridesSection.cs create mode 100644 src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryCommandSection.cs create mode 100644 src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryConnectionSection.cs diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index bb77ffba3e..06e7fe8a8a 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -269,6 +269,15 @@ Microsoft\Data\SqlClient\Reliability\AppConfigManager.cs + + Microsoft\Data\SqlClient\Reliability\IAppContextSwitchOverridesSection.cs + + + Microsoft\Data\SqlClient\Reliability\ISqlConfigurableRetryCommandSection.cs + + + Microsoft\Data\SqlClient\Reliability\ISqlConfigurableRetryConnectionSection.cs + Microsoft\Data\SqlClient\Reliability\SqlRetryingEventArgs.cs 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 e5840b17a3..f66ba02ba8 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -445,6 +445,15 @@ Microsoft\Data\SqlClient\Reliability\AppConfigManager.cs + + Microsoft\Data\SqlClient\Reliability\IAppContextSwitchOverridesSection.cs + + + Microsoft\Data\SqlClient\Reliability\ISqlConfigurableRetryCommandSection.cs + + + Microsoft\Data\SqlClient\Reliability\ISqlConfigurableRetryConnectionSection.cs + Microsoft\Data\SqlClient\Reliability\SqlRetryingEventArgs.cs diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/IAppContextSwitchOverridesSection.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/IAppContextSwitchOverridesSection.cs new file mode 100644 index 0000000000..6f75b9f335 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/IAppContextSwitchOverridesSection.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.Data.SqlClient +{ + internal interface IAppContextSwitchOverridesSection + { + string Value { get; set; } + } +} diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryCommandSection.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryCommandSection.cs new file mode 100644 index 0000000000..3f7c154312 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryCommandSection.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.Data.SqlClient +{ + internal interface ISqlConfigurableRetryCommandSection : ISqlConfigurableRetryConnectionSection + { + string AuthorizedSqlCondition { get; set; } + } +} diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryConnectionSection.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryConnectionSection.cs new file mode 100644 index 0000000000..51f92bd3ba --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/ISqlConfigurableRetryConnectionSection.cs @@ -0,0 +1,25 @@ +// 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; + +namespace Microsoft.Data.SqlClient +{ + internal interface ISqlConfigurableRetryConnectionSection + { + TimeSpan DeltaTime { get; set; } + + TimeSpan MaxTimeInterval { get; set; } + + TimeSpan MinTimeInterval { get; set; } + + int NumberOfTries { get; set; } + + string RetryLogicType { get; set; } + + string RetryMethod { get; set; } + + string TransientErrors { get; set; } + } +} diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs index 7871e6522f..aa20f7b845 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.cs @@ -86,25 +86,4 @@ internal static SqlRetryLogicBaseProvider CommandProvider } } } - - internal interface IAppContextSwitchOverridesSection - { - string Value { get; set; } - } - - internal interface ISqlConfigurableRetryConnectionSection - { - TimeSpan DeltaTime { get; set; } - TimeSpan MaxTimeInterval { get; set; } - TimeSpan MinTimeInterval { get; set; } - int NumberOfTries { get; set; } - string RetryLogicType { get; set; } - string RetryMethod { get; set; } - string TransientErrors { get; set; } - } - - internal interface ISqlConfigurableRetryCommandSection : ISqlConfigurableRetryConnectionSection - { - string AuthorizedSqlCondition { get; set; } - } } From bb085a8d2a83fa2875c8e73972e3437d06a44355 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 25 Mar 2025 17:28:13 -0500 Subject: [PATCH 2/3] Roll SqlConfigurableRetryLogicManager.NetCoreApp.cs into SqlConfigurableRetryLogicLoader class --- .../src/Microsoft.Data.SqlClient.csproj | 1 - ...onfigurableRetryLogicManager.NetCoreApp.cs | 112 ---------------- .../SqlConfigurableRetryLogicLoader.cs | 125 ++++++++++++++++-- 3 files changed, 116 insertions(+), 122 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.NetCoreApp.cs diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 06e7fe8a8a..baa69674b8 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -705,7 +705,6 @@ - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.NetCoreApp.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.NetCoreApp.cs deleted file mode 100644 index fc0e4c80a3..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.NetCoreApp.cs +++ /dev/null @@ -1,112 +0,0 @@ -// 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.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime.Loader; - -namespace Microsoft.Data.SqlClient -{ - /// - /// Configurable retry logic manager - /// - internal sealed partial class SqlConfigurableRetryLogicLoader - { - #region Type resolution - /// - /// Performs a case-sensitive search to resolve the specified type name - /// and its related assemblies in default assembly load context if they aren't loaded yet. - /// - /// Resolved type if it could resolve the type; otherwise, the `SqlConfigurableRetryFactory` type. - private static Type LoadType(string fullyQualifiedName) - { - string methodName = nameof(LoadType); - SqlClientEventSource.Log.TryTraceEvent(" Entry point.", TypeName, methodName); - - var result = Type.GetType(fullyQualifiedName, AssemblyResolver, TypeResolver); - if (result != null) - { - SqlClientEventSource.Log.TryTraceEvent(" The '{2}' type is resolved.", - TypeName, methodName, result.FullName); - } - else - { - result = typeof(SqlConfigurableRetryFactory); - SqlClientEventSource.Log.TryTraceEvent(" Couldn't resolve the requested type by '{2}'; The internal `{3}` type is returned.", - TypeName, methodName, fullyQualifiedName, result.FullName); - } - SqlClientEventSource.Log.TryTraceEvent(" Exit point.", TypeName, methodName); - return result; - } - - /// - /// If the caller does not have sufficient permissions to read the specified file, - /// no exception is thrown and the method returns null regardless of the existence of path. - /// - private static string MakeFullPath(string directory, string assemblyName, string extension = ".dll") - { - string methodName = nameof(MakeFullPath); - SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly in '{3}' directory." - , TypeName, methodName, assemblyName, directory); - string fullPath = Path.Combine(directory, assemblyName); - fullPath = string.IsNullOrEmpty(Path.GetExtension(fullPath)) ? fullPath + extension : fullPath; - SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly by '{3}' full path." - , TypeName, methodName, assemblyName, fullPath); - return File.Exists(fullPath) ? fullPath : null; - } - - private static Assembly AssemblyResolver(AssemblyName arg) - { - string methodName = nameof(AssemblyResolver); - - string fullPath = MakeFullPath(Environment.CurrentDirectory, arg.Name); - SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly by '{3}' full path." - , TypeName, methodName, arg, fullPath); - - return fullPath == null ? null : AssemblyLoadContext.Default.LoadFromAssemblyPath(fullPath); - } - - private static Type TypeResolver(Assembly arg1, string arg2, bool arg3) - { - IEnumerable types = arg1?.ExportedTypes; - Type result = null; - if (types != null) - { - foreach (Type type in types) - { - if (type.FullName == arg2) - { - if (result != null) - { - throw new InvalidOperationException("Sequence contains more than one matching element"); - } - result = type; - } - } - } - if (result == null) - { - throw new InvalidOperationException("Sequence contains no matching element"); - } - return result; - } - - /// - /// Load assemblies on request. - /// - private static Assembly Default_Resolving(AssemblyLoadContext arg1, AssemblyName arg2) - { - string methodName = nameof(Default_Resolving); - - string target = MakeFullPath(Environment.CurrentDirectory, arg2.Name); - SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly that is requested by '{3}' ALC from '{4}' path." - , TypeName, methodName, arg2, arg1, target); - - return target == null ? null : arg1.LoadFromAssemblyPath(target); - } - #endregion - } -} 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 c558744481..1f0986b5ff 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 @@ -8,6 +8,11 @@ using System.Reflection; using System.Text.RegularExpressions; +#if NET +using System.IO; +using System.Runtime.Loader; +#endif + namespace Microsoft.Data.SqlClient { /// @@ -38,18 +43,20 @@ private void AssignProviders(SqlRetryLogicBaseProvider cnnProvider = null, SqlRe /// internal SqlRetryLogicBaseProvider CommandProvider { get; private set; } - public SqlConfigurableRetryLogicLoader(ISqlConfigurableRetryConnectionSection connectionRetryConfigs, - ISqlConfigurableRetryCommandSection commandRetryConfigs, - string cnnSectionName = SqlConfigurableRetryConnectionSection.Name, - string cmdSectionName = SqlConfigurableRetryCommandSection.Name) + public SqlConfigurableRetryLogicLoader( + ISqlConfigurableRetryConnectionSection connectionRetryConfigs, + ISqlConfigurableRetryCommandSection commandRetryConfigs, + string cnnSectionName = SqlConfigurableRetryConnectionSection.Name, + string cmdSectionName = SqlConfigurableRetryCommandSection.Name) { -#if NET + #if NET // Just only one subscription to this event is required. // This class isn't supposed to be called more than one time; // SqlConfigurableRetryLogicManager manages a single instance of this class. System.Runtime.Loader.AssemblyLoadContext.Default.Resolving -= Default_Resolving; System.Runtime.Loader.AssemblyLoadContext.Default.Resolving += Default_Resolving; -#endif + #endif + AssignProviders(connectionRetryConfigs == null ? null : CreateRetryLogicProvider(cnnSectionName, connectionRetryConfigs), commandRetryConfigs == null ? null : CreateRetryLogicProvider(cmdSectionName, commandRetryConfigs)); } @@ -156,10 +163,12 @@ private static SqlRetryLogicBaseProvider ResolveRetryLogicProvider(string config } private static object CreateInstance( -#if NET + #if NET [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor | DynamicallyAccessedMemberTypes.PublicMethods)] -#endif - Type type, string retryMethodName, SqlRetryLogicOption option) + #endif + Type type, + string retryMethodName, + SqlRetryLogicOption option) { string methodName = nameof(CreateInstance); SqlClientEventSource.Log.TryTraceEvent(" Entry point.", TypeName, methodName); @@ -324,5 +333,103 @@ private static ICollection SplitErrorNumberList(string list) } return new HashSet(); } + + #if NET + #region Type Resolution + + private static Assembly AssemblyResolver(AssemblyName arg) + { + string methodName = nameof(AssemblyResolver); + + string fullPath = MakeFullPath(Environment.CurrentDirectory, arg.Name); + SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly by '{3}' full path." + , TypeName, methodName, arg, fullPath); + + return fullPath == null ? null : AssemblyLoadContext.Default.LoadFromAssemblyPath(fullPath); + } + + /// + /// Load assemblies on request. + /// + private static Assembly Default_Resolving(AssemblyLoadContext arg1, AssemblyName arg2) + { + string methodName = nameof(Default_Resolving); + + string target = MakeFullPath(Environment.CurrentDirectory, arg2.Name); + SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly that is requested by '{3}' ALC from '{4}' path." + , TypeName, methodName, arg2, arg1, target); + + return target == null ? null : arg1.LoadFromAssemblyPath(target); + } + + /// + /// Performs a case-sensitive search to resolve the specified type name + /// and its related assemblies in default assembly load context if they aren't loaded yet. + /// + /// Resolved type if it could resolve the type; otherwise, the `SqlConfigurableRetryFactory` type. + private static Type LoadType(string fullyQualifiedName) + { + string methodName = nameof(LoadType); + SqlClientEventSource.Log.TryTraceEvent(" Entry point.", TypeName, methodName); + + var result = Type.GetType(fullyQualifiedName, AssemblyResolver, TypeResolver); + if (result != null) + { + SqlClientEventSource.Log.TryTraceEvent(" The '{2}' type is resolved.", + TypeName, methodName, result.FullName); + } + else + { + result = typeof(SqlConfigurableRetryFactory); + SqlClientEventSource.Log.TryTraceEvent(" Couldn't resolve the requested type by '{2}'; The internal `{3}` type is returned.", + TypeName, methodName, fullyQualifiedName, result.FullName); + } + SqlClientEventSource.Log.TryTraceEvent(" Exit point.", TypeName, methodName); + return result; + } + + /// + /// If the caller does not have sufficient permissions to read the specified file, + /// no exception is thrown and the method returns null regardless of the existence of path. + /// + private static string MakeFullPath(string directory, string assemblyName, string extension = ".dll") + { + string methodName = nameof(MakeFullPath); + SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly in '{3}' directory." + , TypeName, methodName, assemblyName, directory); + string fullPath = Path.Combine(directory, assemblyName); + fullPath = string.IsNullOrEmpty(Path.GetExtension(fullPath)) ? fullPath + extension : fullPath; + SqlClientEventSource.Log.TryTraceEvent(" Looking for '{2}' assembly by '{3}' full path." + , TypeName, methodName, assemblyName, fullPath); + return File.Exists(fullPath) ? fullPath : null; + } + + private static Type TypeResolver(Assembly arg1, string arg2, bool arg3) + { + IEnumerable types = arg1?.ExportedTypes; + Type result = null; + if (types != null) + { + foreach (Type type in types) + { + if (type.FullName == arg2) + { + if (result != null) + { + throw new InvalidOperationException("Sequence contains more than one matching element"); + } + result = type; + } + } + } + if (result == null) + { + throw new InvalidOperationException("Sequence contains no matching element"); + } + return result; + } + + #endregion + #endif } } From 18ee367843f514548deedc18bc454c5c5a97a5d1 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 25 Mar 2025 17:56:43 -0500 Subject: [PATCH 3/3] Roll netfx SqlConfigurableRetryLogicManager.LoadType.cs into SqlConfigurableRetryLogicLoader --- .../netfx/src/Microsoft.Data.SqlClient.csproj | 1 - ...lConfigurableRetryLogicManager.LoadType.cs | 30 ------------------- .../SqlConfigurableRetryLogicLoader.cs | 23 +++++++++++--- 3 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.LoadType.cs 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 f66ba02ba8..c4a85e413f 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -872,7 +872,6 @@ - diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.LoadType.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.LoadType.cs deleted file mode 100644 index 922006b47f..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryLogicManager.LoadType.cs +++ /dev/null @@ -1,30 +0,0 @@ -// 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.Reflection; - -namespace Microsoft.Data.SqlClient -{ - /// - /// Configurable retry logic loader - /// - internal sealed partial class SqlConfigurableRetryLogicLoader - { - /// - /// Performs a case-sensitive search to resolve the specified type name. - /// - /// - /// Resolved type if it could resolve the type; otherwise, the `SqlConfigurableRetryFactory` type. - private static Type LoadType(string fullyQualifiedName) - { - string methodName = nameof(LoadType); - - var result = Type.GetType(fullyQualifiedName); - SqlClientEventSource.Log.TryTraceEvent(" The '{2}' type is resolved." - , TypeName, methodName, result?.FullName); - return result != null ? result : typeof(SqlConfigurableRetryFactory); - } - } -} 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 1f0986b5ff..1dc48e8374 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 @@ -4,11 +4,11 @@ using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Text.RegularExpressions; #if NET +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.Loader; #endif @@ -20,7 +20,7 @@ namespace Microsoft.Data.SqlClient /// This class shouldn't throw exceptions; /// All exceptions should be handled internally and logged with Event Source. /// - internal sealed partial class SqlConfigurableRetryLogicLoader + internal sealed class SqlConfigurableRetryLogicLoader { private const string TypeName = nameof(SqlConfigurableRetryLogicLoader); @@ -334,9 +334,9 @@ private static ICollection SplitErrorNumberList(string list) return new HashSet(); } - #if NET #region Type Resolution + #if NET private static Assembly AssemblyResolver(AssemblyName arg) { string methodName = nameof(AssemblyResolver); @@ -428,8 +428,23 @@ private static Type TypeResolver(Assembly arg1, string arg2, bool arg3) } return result; } + #else + /// + /// Performs a case-sensitive search to resolve the specified type name. + /// + /// + /// Resolved type if it could resolve the type; otherwise, the `SqlConfigurableRetryFactory` type. + private static Type LoadType(string fullyQualifiedName) + { + string methodName = nameof(LoadType); + + var result = Type.GetType(fullyQualifiedName); + SqlClientEventSource.Log.TryTraceEvent(" The '{2}' type is resolved." + , TypeName, methodName, result?.FullName); + return result != null ? result : typeof(SqlConfigurableRetryFactory); + } + #endif #endregion - #endif } }