Esempio n. 1
0
 protected ProcessorBase(IMigrationGenerator generator,
                         ILogger logger,
                         ProcessorOptions options)
 {
     Generator = generator;
     Options   = options;
     Logger    = logger;
 }
Esempio n. 2
0
 protected GenericProcessorBase(Func <DbProviderFactory> factoryAccessor,
                                IMigrationGenerator generator,
                                ILogger logger,
                                ProcessorOptions options)
     : base(generator, logger, options)
 {
     _dbProviderFactory = new Lazy <DbProviderFactory>(factoryAccessor.Invoke);
     _lazyConnection    = new Lazy <IDbConnection>(
         () => {
         var connection = DbProviderFactory.CreateConnection();
         Debug.Assert(connection != null, nameof(Connection) + " != null");
         connection.ConnectionString = options.ConnectionString;
         connection.Open();
         return(connection);
     });
 }