コード例 #1
0
ファイル: ProcessorBase.cs プロジェクト: saeidjoker/libc.orm
 protected ProcessorBase(IMigrationGenerator generator,
                         ILogger logger,
                         ProcessorOptions options)
 {
     Generator = generator;
     Options   = options;
     Logger    = logger;
 }
コード例 #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);
     });
 }