public JetProcessor( [NotNull] JetGenerator generator, [NotNull] ILogger <JetProcessor> logger, [NotNull] IOptionsSnapshot <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(generator, logger, options.Value) { var factory = OleDbFactory.Instance; var connectionString = connectionStringAccessor.ConnectionString ?? options.Value.ConnectionString; if (factory != null) { _connection = new Lazy <OleDbConnection>( () => { var conn = (OleDbConnection)factory.CreateConnection(); Debug.Assert(conn != null, nameof(conn) + " != null"); conn.ConnectionString = connectionString; return(conn); }); } #pragma warning disable 612 ConnectionString = connectionString; #pragma warning restore 612 }
public JetProcessor( [NotNull] JetGenerator generator, [NotNull] ILogger <JetProcessor> logger, [NotNull] IOptions <ProcessorOptions> options, [NotNull] IConnectionStringAccessor connectionStringAccessor) : base(generator, logger, options.Value) { var factory = OleDbFactory.Instance; if (factory != null) { _connection = factory.CreateConnection(); Debug.Assert(_connection != null, nameof(_connection) + " != null"); _connection.ConnectionString = connectionStringAccessor.ConnectionString; } #pragma warning disable 612 ConnectionString = options.Value.ConnectionString; #pragma warning restore 612 }
public void SetUp() { _generator = new JetGenerator(); }
public void Setup() { Generator = new JetGenerator(); }
public void SetUp() { _generator = new JetGenerator(); }