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 9d0d3c5fc1..d1ddbf37af 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
@@ -33,7 +33,7 @@
Microsoft\Data\SqlClient\SqlClientEventSource.cs
-
+
Microsoft\Data\SqlClient\SqlClientLogger.cs
@@ -66,7 +66,7 @@
Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs
-
+
Microsoft\Data\SqlClient\OnChangedEventHandler.cs
@@ -143,13 +143,17 @@
+
+
+
+
@@ -657,12 +661,12 @@
-
+
-
+
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs
new file mode 100644
index 0000000000..c02a96e236
--- /dev/null
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs
@@ -0,0 +1,134 @@
+// 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.Concurrent;
+using System.Collections.Generic;
+using System.Configuration;
+
+namespace Microsoft.Data.SqlClient
+{
+ internal partial class SqlAuthenticationProviderManager
+ {
+ private readonly SqlAuthenticationInitializer _initializer;
+
+ static SqlAuthenticationProviderManager()
+ {
+ var activeDirectoryAuthNativeProvider = new ActiveDirectoryNativeAuthenticationProvider();
+ SqlAuthenticationProviderConfigurationSection configurationSection;
+
+ try
+ {
+ configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
+ }
+ catch (ConfigurationErrorsException e)
+ {
+ throw SQL.CannotGetAuthProviderConfig(e);
+ }
+
+ Instance = new SqlAuthenticationProviderManager(configurationSection);
+ Instance.SetProvider(SqlAuthenticationMethod.ActiveDirectoryPassword, activeDirectoryAuthNativeProvider);
+ }
+
+ ///
+ /// Constructor.
+ ///
+ public SqlAuthenticationProviderManager(SqlAuthenticationProviderConfigurationSection configSection = null)
+ {
+ var methodName = "Ctor";
+ _typeName = GetType().Name;
+ _providers = new ConcurrentDictionary();
+ var authenticationsWithAppSpecifiedProvider = new HashSet();
+ _authenticationsWithAppSpecifiedProvider = authenticationsWithAppSpecifiedProvider;
+
+ if (configSection == null)
+ {
+ _sqlAuthLogger.LogInfo(_typeName, methodName, "No SqlAuthProviders configuration section found.");
+ return;
+ }
+
+ // Create user-defined auth initializer, if any.
+ if (!string.IsNullOrEmpty(configSection.InitializerType))
+ {
+ try
+ {
+ var initializerType = Type.GetType(configSection.InitializerType, true);
+ _initializer = (SqlAuthenticationInitializer)Activator.CreateInstance(initializerType);
+ _initializer.Initialize();
+ }
+ catch (Exception e)
+ {
+ throw SQL.CannotCreateSqlAuthInitializer(configSection.InitializerType, e);
+ }
+ _sqlAuthLogger.LogInfo(_typeName, methodName, "Created user-defined SqlAuthenticationInitializer.");
+ }
+ else
+ {
+ _sqlAuthLogger.LogInfo(_typeName, methodName, "No user-defined SqlAuthenticationInitializer found.");
+ }
+
+ // add user-defined providers, if any.
+ if (configSection.Providers != null && configSection.Providers.Count > 0)
+ {
+ foreach (ProviderSettings providerSettings in configSection.Providers)
+ {
+ SqlAuthenticationMethod authentication = AuthenticationEnumFromString(providerSettings.Name);
+ SqlAuthenticationProvider provider;
+ try
+ {
+ var providerType = Type.GetType(providerSettings.Type, true);
+ provider = (SqlAuthenticationProvider)Activator.CreateInstance(providerType);
+ }
+ catch (Exception e)
+ {
+ throw SQL.CannotCreateAuthProvider(authentication.ToString(), providerSettings.Type, e);
+ }
+ if (!provider.IsSupported(authentication))
+ {
+ throw SQL.UnsupportedAuthenticationByProvider(authentication.ToString(), providerSettings.Type);
+ }
+
+ _providers[authentication] = provider;
+ authenticationsWithAppSpecifiedProvider.Add(authentication);
+ _sqlAuthLogger.LogInfo(_typeName, methodName, string.Format("Added user-defined auth provider: {0} for authentication {1}.", providerSettings?.Type, authentication));
+ }
+ }
+ else
+ {
+ _sqlAuthLogger.LogInfo(_typeName, methodName, "No user-defined auth providers.");
+ }
+ }
+
+ private static SqlAuthenticationMethod AuthenticationEnumFromString(string authentication)
+ {
+ switch (authentication.ToLowerInvariant())
+ {
+ case ActiveDirectoryPassword:
+ return SqlAuthenticationMethod.ActiveDirectoryPassword;
+ default:
+ throw SQL.UnsupportedAuthentication(authentication);
+ }
+ }
+
+ ///
+ /// The configuration section definition for reading app.config.
+ ///
+ internal class SqlAuthenticationProviderConfigurationSection : ConfigurationSection
+ {
+ public const string Name = "SqlAuthenticationProviders";
+
+ ///
+ /// User-defined auth providers.
+ ///
+ [ConfigurationProperty("providers")]
+ public ProviderSettingsCollection Providers => (ProviderSettingsCollection)base["providers"];
+
+ ///
+ /// User-defined initializer.
+ ///
+ [ConfigurationProperty("initializerType")]
+ public string InitializerType => base["initializerType"] as string;
+ }
+ }
+}
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetStandard.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetStandard.cs
new file mode 100644
index 0000000000..ef6328af0d
--- /dev/null
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetStandard.cs
@@ -0,0 +1,16 @@
+// 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 partial class SqlAuthenticationProviderManager
+ {
+ static SqlAuthenticationProviderManager()
+ {
+ var activeDirectoryAuthNativeProvider = new ActiveDirectoryNativeAuthenticationProvider();
+ Instance = new SqlAuthenticationProviderManager();
+ Instance.SetProvider(SqlAuthenticationMethod.ActiveDirectoryPassword, activeDirectoryAuthNativeProvider);
+ }
+ }
+}
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
index 0d382aa512..b9a002a240 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
@@ -10,106 +10,31 @@
namespace Microsoft.Data.SqlClient
{
-
///
/// Authentication provider manager.
///
- internal class SqlAuthenticationProviderManager
+ internal partial class SqlAuthenticationProviderManager
{
private const string ActiveDirectoryPassword = "active directory password";
private const string ActiveDirectoryIntegrated = "active directory integrated";
private const string ActiveDirectoryInteractive = "active directory interactive";
- static SqlAuthenticationProviderManager()
- {
- var activeDirectoryAuthNativeProvider = new ActiveDirectoryNativeAuthenticationProvider();
- SqlAuthenticationProviderConfigurationSection configurationSection;
- try
- {
- configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
- }
- catch (ConfigurationErrorsException e)
- {
- throw SQL.CannotGetAuthProviderConfig(e);
- }
- Instance = new SqlAuthenticationProviderManager(configurationSection);
- Instance.SetProvider(SqlAuthenticationMethod.ActiveDirectoryPassword, activeDirectoryAuthNativeProvider);
- }
- public static readonly SqlAuthenticationProviderManager Instance;
-
private readonly string _typeName;
- private readonly SqlAuthenticationInitializer _initializer;
private readonly IReadOnlyCollection _authenticationsWithAppSpecifiedProvider;
private readonly ConcurrentDictionary _providers;
private readonly SqlClientLogger _sqlAuthLogger = new SqlClientLogger();
+ public static readonly SqlAuthenticationProviderManager Instance;
+
///
/// Constructor.
///
- public SqlAuthenticationProviderManager(SqlAuthenticationProviderConfigurationSection configSection)
+ public SqlAuthenticationProviderManager()
{
_typeName = GetType().Name;
- var methodName = "Ctor";
_providers = new ConcurrentDictionary();
- var authenticationsWithAppSpecifiedProvider = new HashSet();
- _authenticationsWithAppSpecifiedProvider = authenticationsWithAppSpecifiedProvider;
-
- if (configSection == null)
- {
- _sqlAuthLogger.LogInfo(_typeName, methodName, "No SqlAuthProviders configuration section found.");
- return;
- }
-
- // Create user-defined auth initializer, if any.
- //
- if (!string.IsNullOrEmpty(configSection.InitializerType))
- {
- try
- {
- var initializerType = Type.GetType(configSection.InitializerType, true);
- _initializer = (SqlAuthenticationInitializer)Activator.CreateInstance(initializerType);
- _initializer.Initialize();
- }
- catch (Exception e)
- {
- throw SQL.CannotCreateSqlAuthInitializer(configSection.InitializerType, e);
- }
- _sqlAuthLogger.LogInfo(_typeName, methodName, "Created user-defined SqlAuthenticationInitializer.");
- }
- else
- {
- _sqlAuthLogger.LogInfo(_typeName, methodName, "No user-defined SqlAuthenticationInitializer found.");
- }
-
- // add user-defined providers, if any.
- //
- if (configSection.Providers != null && configSection.Providers.Count > 0)
- {
- foreach (ProviderSettings providerSettings in configSection.Providers)
- {
- SqlAuthenticationMethod authentication = AuthenticationEnumFromString(providerSettings.Name);
- SqlAuthenticationProvider provider;
- try
- {
- var providerType = Type.GetType(providerSettings.Type, true);
- provider = (SqlAuthenticationProvider)Activator.CreateInstance(providerType);
- }
- catch (Exception e)
- {
- throw SQL.CannotCreateAuthProvider(authentication.ToString(), providerSettings.Type, e);
- }
- if (!provider.IsSupported(authentication))
- throw SQL.UnsupportedAuthenticationByProvider(authentication.ToString(), providerSettings.Type);
-
- _providers[authentication] = provider;
- authenticationsWithAppSpecifiedProvider.Add(authentication);
- _sqlAuthLogger.LogInfo(_typeName, methodName, string.Format("Added user-defined auth provider: {0} for authentication {1}.", providerSettings?.Type, authentication));
- }
- }
- else
- {
- _sqlAuthLogger.LogInfo(_typeName, methodName, "No user-defined auth providers.");
- }
+ _authenticationsWithAppSpecifiedProvider = new HashSet();
+ _sqlAuthLogger.LogInfo(_typeName, "Ctor", "No SqlAuthProviders configuration section found.");
}
///
@@ -156,17 +81,6 @@ public bool SetProvider(SqlAuthenticationMethod authenticationMethod, SqlAuthent
return true;
}
- private static SqlAuthenticationMethod AuthenticationEnumFromString(string authentication)
- {
- switch (authentication.ToLowerInvariant())
- {
- case ActiveDirectoryPassword:
- return SqlAuthenticationMethod.ActiveDirectoryPassword;
- default:
- throw SQL.UnsupportedAuthentication(authentication);
- }
- }
-
private static string GetProviderType(SqlAuthenticationProvider provider)
{
if (provider == null)
@@ -175,26 +89,6 @@ private static string GetProviderType(SqlAuthenticationProvider provider)
}
}
- ///
- /// The configuration section definition for reading app.config.
- ///
- internal class SqlAuthenticationProviderConfigurationSection : ConfigurationSection
- {
- public const string Name = "SqlAuthenticationProviders";
-
- ///
- /// User-defined auth providers.
- ///
- [ConfigurationProperty("providers")]
- public ProviderSettingsCollection Providers => (ProviderSettingsCollection)base["providers"];
-
- ///
- /// User-defined initializer.
- ///
- [ConfigurationProperty("initializerType")]
- public string InitializerType => base["initializerType"] as string;
- }
-
///
public abstract class SqlAuthenticationInitializer
{
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs
index d8b8b073c3..7bcd7cffb5 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs
@@ -38,7 +38,7 @@ internal static class SqlClientDiagnosticListenerExtensions
public const string SqlAfterRollbackTransaction = SqlClientPrefix + nameof(WriteTransactionRollbackAfter);
public const string SqlErrorRollbackTransaction = SqlClientPrefix + nameof(WriteTransactionRollbackError);
- public static Guid WriteCommandBefore(this DiagnosticListener @this, SqlCommand sqlCommand, SqlTransaction transaction, [CallerMemberName] string operation = "")
+ public static Guid WriteCommandBefore(this SqlDiagnosticListener @this, SqlCommand sqlCommand, SqlTransaction transaction, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlBeforeExecuteCommand))
{
@@ -62,7 +62,7 @@ public static Guid WriteCommandBefore(this DiagnosticListener @this, SqlCommand
return Guid.Empty;
}
- public static void WriteCommandAfter(this DiagnosticListener @this, Guid operationId, SqlCommand sqlCommand, SqlTransaction transaction, [CallerMemberName] string operation = "")
+ public static void WriteCommandAfter(this SqlDiagnosticListener @this, Guid operationId, SqlCommand sqlCommand, SqlTransaction transaction, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlAfterExecuteCommand))
{
@@ -81,7 +81,7 @@ public static void WriteCommandAfter(this DiagnosticListener @this, Guid operati
}
}
- public static void WriteCommandError(this DiagnosticListener @this, Guid operationId, SqlCommand sqlCommand, SqlTransaction transaction, Exception ex, [CallerMemberName] string operation = "")
+ public static void WriteCommandError(this SqlDiagnosticListener @this, Guid operationId, SqlCommand sqlCommand, SqlTransaction transaction, Exception ex, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlErrorExecuteCommand))
{
@@ -100,7 +100,7 @@ public static void WriteCommandError(this DiagnosticListener @this, Guid operati
}
}
- public static Guid WriteConnectionOpenBefore(this DiagnosticListener @this, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
+ public static Guid WriteConnectionOpenBefore(this SqlDiagnosticListener @this, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlBeforeOpenConnection))
{
@@ -123,7 +123,7 @@ public static Guid WriteConnectionOpenBefore(this DiagnosticListener @this, SqlC
return Guid.Empty;
}
- public static void WriteConnectionOpenAfter(this DiagnosticListener @this, Guid operationId, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
+ public static void WriteConnectionOpenAfter(this SqlDiagnosticListener @this, Guid operationId, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlAfterOpenConnection))
{
@@ -142,7 +142,7 @@ public static void WriteConnectionOpenAfter(this DiagnosticListener @this, Guid
}
}
- public static void WriteConnectionOpenError(this DiagnosticListener @this, Guid operationId, SqlConnection sqlConnection, Exception ex, [CallerMemberName] string operation = "")
+ public static void WriteConnectionOpenError(this SqlDiagnosticListener @this, Guid operationId, SqlConnection sqlConnection, Exception ex, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlErrorOpenConnection))
{
@@ -161,7 +161,7 @@ public static void WriteConnectionOpenError(this DiagnosticListener @this, Guid
}
}
- public static Guid WriteConnectionCloseBefore(this DiagnosticListener @this, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
+ public static Guid WriteConnectionCloseBefore(this SqlDiagnosticListener @this, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlBeforeCloseConnection))
{
@@ -185,7 +185,7 @@ public static Guid WriteConnectionCloseBefore(this DiagnosticListener @this, Sql
return Guid.Empty;
}
- public static void WriteConnectionCloseAfter(this DiagnosticListener @this, Guid operationId, Guid clientConnectionId, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
+ public static void WriteConnectionCloseAfter(this SqlDiagnosticListener @this, Guid operationId, Guid clientConnectionId, SqlConnection sqlConnection, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlAfterCloseConnection))
{
@@ -203,7 +203,7 @@ public static void WriteConnectionCloseAfter(this DiagnosticListener @this, Guid
}
}
- public static void WriteConnectionCloseError(this DiagnosticListener @this, Guid operationId, Guid clientConnectionId, SqlConnection sqlConnection, Exception ex, [CallerMemberName] string operation = "")
+ public static void WriteConnectionCloseError(this SqlDiagnosticListener @this, Guid operationId, Guid clientConnectionId, SqlConnection sqlConnection, Exception ex, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlErrorCloseConnection))
{
@@ -222,7 +222,7 @@ public static void WriteConnectionCloseError(this DiagnosticListener @this, Guid
}
}
- public static Guid WriteTransactionCommitBefore(this DiagnosticListener @this, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, [CallerMemberName] string operation = "")
+ public static Guid WriteTransactionCommitBefore(this SqlDiagnosticListener @this, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlBeforeCommitTransaction))
{
@@ -246,7 +246,7 @@ public static Guid WriteTransactionCommitBefore(this DiagnosticListener @this, I
return Guid.Empty;
}
- public static void WriteTransactionCommitAfter(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, [CallerMemberName] string operation = "")
+ public static void WriteTransactionCommitAfter(this SqlDiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlAfterCommitTransaction))
{
@@ -264,7 +264,7 @@ public static void WriteTransactionCommitAfter(this DiagnosticListener @this, Gu
}
}
- public static void WriteTransactionCommitError(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, Exception ex, [CallerMemberName] string operation = "")
+ public static void WriteTransactionCommitError(this SqlDiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, Exception ex, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlErrorCommitTransaction))
{
@@ -283,7 +283,7 @@ public static void WriteTransactionCommitError(this DiagnosticListener @this, Gu
}
}
- public static Guid WriteTransactionRollbackBefore(this DiagnosticListener @this, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, string transactionName = null, [CallerMemberName] string operation = "")
+ public static Guid WriteTransactionRollbackBefore(this SqlDiagnosticListener @this, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, string transactionName = null, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlBeforeRollbackTransaction))
{
@@ -308,7 +308,7 @@ public static Guid WriteTransactionRollbackBefore(this DiagnosticListener @this,
return Guid.Empty;
}
- public static void WriteTransactionRollbackAfter(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, string transactionName = null, [CallerMemberName] string operation = "")
+ public static void WriteTransactionRollbackAfter(this SqlDiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, string transactionName = null, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlAfterRollbackTransaction))
{
@@ -327,7 +327,7 @@ public static void WriteTransactionRollbackAfter(this DiagnosticListener @this,
}
}
- public static void WriteTransactionRollbackError(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, Exception ex, string transactionName = null, [CallerMemberName] string operation = "")
+ public static void WriteTransactionRollbackError(this SqlDiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, SqlInternalTransaction transaction, Exception ex, string transactionName = null, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlErrorRollbackTransaction))
{
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
index 9f71f8a5b3..a862d74bcf 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
@@ -69,7 +69,7 @@ public sealed partial class SqlCommand : DbCommand, ICloneable
private static bool _forceInternalEndQuery = false;
#endif
- private static readonly DiagnosticListener _diagnosticListener = new DiagnosticListener(SqlClientDiagnosticListenerExtensions.DiagnosticListenerName);
+ private static readonly SqlDiagnosticListener _diagnosticListener = new SqlDiagnosticListener(SqlClientDiagnosticListenerExtensions.DiagnosticListenerName);
private bool _parentOperationStarted = false;
internal static readonly Action