/// <summary>
 /// Initializes a new instance of the <see cref="SqlAsyncCollector<typeparamref name="T"/>"/> class.
 /// </summary>
 /// <param name="connection">
 /// Contains the SQL connection that will be used by the collector when it inserts SQL rows
 /// into the user's table
 /// </param>
 /// <param name="attribute">
 /// Contains as one of its attributes the SQL table that rows will be inserted into
 /// </param>
 /// <param name="loggerFactory">
 /// Logger Factory for creating an ILogger
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// Thrown if either configuration or attribute is null
 /// </exception>
 public SqlAsyncCollector(IConfiguration configuration, SqlAttribute attribute, ILogger logger)
 {
     this._configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     this._attribute     = attribute ?? throw new ArgumentNullException(nameof(attribute));
     this._logger        = logger;
     TelemetryInstance.TrackCreate(CreateType.SqlAsyncCollector);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlGenericsConverter<typeparamref name="T"/>"/> class.
 /// </summary>
 /// <param name="configuration"></param>
 /// <param name="logger">ILogger used to log information and warnings</param>
 /// <exception cref="ArgumentNullException">
 /// Thrown if the configuration is null
 /// </exception>
 public SqlGenericsConverter(IConfiguration configuration, ILogger logger)
 {
     this._configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     this._logger        = logger;
     TelemetryInstance.TrackCreate(CreateType.SqlGenericsConverter);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlConverter/>"/> class.
 /// </summary>
 /// <param name="configuration"></param>
 /// <exception cref="ArgumentNullException">
 /// Thrown if the configuration is null
 /// </exception>
 public SqlConverter(IConfiguration configuration)
 {
     this._configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     TelemetryInstance.TrackCreate(CreateType.SqlConverter);
 }