コード例 #1
0
 public ConnectionStringManager(INetConfigManager configManager, string connection, string configPath, string assemblyLocation, string database)
 {
     this.connection = connection;
     this.configPath = configPath;
     this.database = database;
     this.assemblyLocation = assemblyLocation;
     this.notUsingConfig = true;
     this.configManager = configManager;
 }
コード例 #2
0
 public AppConfigConnectionStringReader(
     [NotNull] INetConfigManager configManager,
     [NotNull] string assemblyLocation,
     [NotNull] IAnnouncer announcer,
     [NotNull] IOptions <AppConfigConnectionStringAccessorOptions> options)
 {
     _configManager    = configManager;
     _logger           = new AnnouncerFluentMigratorLogger(announcer);
     _options          = options.Value;
     _assemblyLocation = assemblyLocation;
 }
コード例 #3
0
 public ConnectionStringManager(INetConfigManager configManager, IAnnouncer announcer, string connection, string configPath, string assemblyLocation,
                                string database)
 {
     this.connection       = connection;
     this.configPath       = configPath;
     this.database         = database;
     this.assemblyLocation = assemblyLocation;
     notUsingConfig        = true;
     this.configManager    = configManager;
     this.announcer        = announcer;
 }
コード例 #4
0
 public ConnectionStringManager(INetConfigManager configManager, ILogger <ConnectionStringManager> logger, string connection, string configPath, string assemblyLocation,
                                string database)
 {
     _connection       = connection;
     _configPath       = configPath;
     _database         = database;
     _assemblyLocation = assemblyLocation;
     _notUsingConfig   = true;
     _configManager    = configManager;
     _logger           = logger;
 }
コード例 #5
0
        public AppConfigConnectionStringReader(
            [NotNull] INetConfigManager configManager,
            [NotNull] IAssemblySource assemblySource,
            [NotNull] ILogger <AppConfigConnectionStringReader> logger,
            [NotNull] IOptions <AppConfigConnectionStringAccessorOptions> options)
        {
            _configManager = configManager;
            _logger        = logger;
            _options       = options.Value;
            var assemblies     = assemblySource.Assemblies;
            var singleAssembly = assemblies.Count == 1 ? assemblies.Single() : null;

            _assemblyLocation = singleAssembly != null ? singleAssembly.Location : string.Empty;
        }