in src/SqlBindingConfigProvider.cs [53:77]
public void Initialize(ExtensionConfigContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
ILogger logger = this._loggerFactory.CreateLogger(LogCategories.Bindings);
TelemetryInstance.Initialize(this._configuration, logger);
// Only enable SQL Client logging when VerboseLogging is set in the config to avoid extra overhead when the
// detailed logging it provides isn't needed
if (this.sqlClientListener == null && Utils.GetConfigSettingAsBool(VerboseLoggingSettingName, this._configuration))
{
this.sqlClientListener = new SqlClientListener(logger);
}
LogDependentAssemblyVersions(logger);
#pragma warning disable CS0618 // Fine to use this for our stuff
FluentBindingRule<SqlAttribute> inputOutputRule = context.AddBindingRule<SqlAttribute>();
var converter = new SqlConverter(this._configuration);
inputOutputRule.BindToInput(converter);
inputOutputRule.BindToInput<string>(typeof(SqlGenericsConverter<string>), this._configuration, logger);
inputOutputRule.BindToCollector<SQLObjectOpenType>(typeof(SqlAsyncCollectorBuilder<>), this._configuration, logger);
inputOutputRule.BindToInput<OpenType>(typeof(SqlGenericsConverter<>), this._configuration, logger);
context.AddBindingRule<SqlTriggerAttribute>().BindToTrigger(this._triggerProvider);
}