コード例 #1
0
        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));
        }
コード例 #2
0
 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;
 }
コード例 #3
0
 public void SetUp()
 {
     ServiceScope = ServiceProvider.CreateScope();
     Processor    = ServiceScope.ServiceProvider.GetRequiredService <Db2ISeriesProcessor>();
     Quoter       = ServiceScope.ServiceProvider.GetRequiredService <Db2ISeriesQuoter>();
 }