public override IMigrationProcessor Create(string connectionString, IAnnouncer announcer, IMigrationProcessorOptions options) { var factory = new Db2ISeriesDbFactory(_serviceProvider); var quoter = new Db2ISeriesQuoter(new OptionsWrapper <QuoterOptions>(new QuoterOptions())); var connection = factory.CreateConnection(connectionString); var generatorOptions = new OptionsWrapper <GeneratorOptions>(new GeneratorOptions()); return(new Db2ISeriesProcessor(connection, new Db2ISeriesGenerator(quoter, generatorOptions), announcer, options, factory)); }
public Db2ISeriesProcessor( [NotNull] Db2ISeriesDbFactory factory, [NotNull] Db2ISeriesGenerator generator, [NotNull] Db2ISeriesQuoter quoter, [NotNull] ILogger <Db2ISeriesProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(() => factory.Factory, generator, logger, options.Value, connectionStringAccessor) { Quoter = quoter; }
public void SetUp() { ServiceScope = ServiceProvider.CreateScope(); Processor = ServiceScope.ServiceProvider.GetRequiredService <Db2ISeriesProcessor>(); Quoter = ServiceScope.ServiceProvider.GetRequiredService <Db2ISeriesQuoter>(); }