public YadlLoggerProvider(IYadlProcessor processor, YadlLoggerOptions options) { _options = options; _processor = processor; if (_options == null) { throw new ArgumentNullException(nameof(_options)); } if (_processor == null) { throw new ArgumentNullException(nameof(_processor)); } if (_options.BatchSize <= 0) { throw new ArgumentOutOfRangeException(nameof(_options.BatchSize), $"{nameof(_options.BatchSize)} must be a positive number."); } if (string.IsNullOrEmpty(_options.ConnectionString)) { throw new ArgumentNullException(nameof(_options.ConnectionString), $"{nameof(_options.ConnectionString)} cannot be null or empty."); } if (string.IsNullOrEmpty(_options.TableDestination)) { throw new ArgumentNullException(nameof(_options.TableDestination), $"{nameof(_options.TableDestination)} cannot be null or empty."); } }
public TimedHostedService(IYadlProcessor processor, YadlLoggerOptions options, ISqlServerBulk sqlServerBulk) { _processor = processor; _options = options; _sqlServerBulk = sqlServerBulk; _memberLock = new object(); }
public YadlLoggerProvider(IYadlProcessor processor, IOptions <YadlLoggerOptions> options) : this(processor, options.Value) { }
public YadlLogger(string name, YadlLoggerOptions options, IYadlProcessor processor) { _name = name; _options = options; _processor = processor; }
public YadlLogger(string name, IOptions <YadlLoggerOptions> options, IYadlProcessor processor) : this(name, options.Value, processor) { }
public TimedHostedService(IYadlProcessor processor, IOptions <YadlLoggerOptions> options, ISqlServerBulk sqlServerBulk) : this(processor, options.Value, sqlServerBulk) { }