public void ConnectionStringValidated(string connectionString, bool isValid) { var config = new SqlScaleoutOptions(); if (isValid) { config.ConnectionString = connectionString; } else { Assert.Throws(typeof(ArgumentNullException), () => config.ConnectionString = connectionString); } }
public void ConnectionStringValidated(string connectionString, bool isValid) { var config = new SqlScaleoutOptions(); if (isValid) { config.ConnectionString = connectionString; } else { Assert.Throws(typeof(ArgumentNullException), () => config.ConnectionString = connectionString); } }
public void TableCountValidated(int tableCount, bool isValid) { var config = new SqlScaleoutOptions(); if (isValid) { config.ConnectionString = "dummy"; config.TableCount = tableCount; } else { Assert.Throws(typeof(ArgumentOutOfRangeException), () => config.TableCount = tableCount); } }
public void TableCountValidated(int tableCount, bool isValid) { var config = new SqlScaleoutOptions(); if (isValid) { config.ConnectionString = "dummy"; config.TableCount = tableCount; } else { Assert.Throws(typeof(ArgumentOutOfRangeException), () => config.TableCount = tableCount); } }
internal SqlMessageBus(IStringMinifier stringMinifier, ILoggerFactory loggerFactory, IPerformanceCounterManager performanceCounterManager, IOptions<MessageBusOptions> optionsAccessor, IOptions<SqlScaleoutOptions> scaleoutOptionsAccessor, IDbProviderFactory dbProviderFactory) : base(stringMinifier, loggerFactory, performanceCounterManager, optionsAccessor, scaleoutOptionsAccessor) { var configuration = scaleoutOptionsAccessor.Options; _connectionString = configuration.ConnectionString; _configuration = configuration; _dbProviderFactory = dbProviderFactory; _logger = loggerFactory.CreateLogger<SqlMessageBus>(); ThreadPool.QueueUserWorkItem(Initialize); }
internal SqlMessageBus(IStringMinifier stringMinifier, ILoggerFactory loggerFactory, IPerformanceCounterManager performanceCounterManager, IOptions <MessageBusOptions> optionsAccessor, IOptions <SqlScaleoutOptions> scaleoutOptionsAccessor, IDbProviderFactory dbProviderFactory) : base(stringMinifier, loggerFactory, performanceCounterManager, optionsAccessor, scaleoutOptionsAccessor) { var configuration = scaleoutOptionsAccessor.Value; _connectionString = configuration.ConnectionString; _configuration = configuration; _dbProviderFactory = dbProviderFactory; _logger = loggerFactory.CreateLogger <SqlMessageBus>(); ThreadPool.QueueUserWorkItem(Initialize); }