File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
33using System . IO ;
4- using System . Threading ;
54using Microsoft . Extensions . Configuration ;
65
76using MySql . Data . MySqlClient ;
@@ -20,22 +19,12 @@ public static class AppConfig
2019
2120 public static string CertsPath => Path . GetFullPath ( Config . GetValue < string > ( "Data:CertificatesPath" ) ) ;
2221
23- private static int _configFirst ;
24-
2522 private static IConfiguration ConfigBuilder { get ; } = new ConfigurationBuilder ( )
2623 . AddInMemoryCollection ( DefaultConfig )
2724 . AddJsonFile ( "config.json" )
2825 . Build ( ) ;
2926
30- public static IConfiguration Config
31- {
32- get
33- {
34- if ( Interlocked . Exchange ( ref _configFirst , 1 ) == 0 )
35- Console . WriteLine ( "Config Read" ) ;
36- return ConfigBuilder ;
37- }
38- }
27+ public static IConfiguration Config => ConfigBuilder ;
3928
4029 public static string ConnectionString => Config . GetValue < string > ( "Data:ConnectionString" ) ;
4130
@@ -64,6 +53,6 @@ public static MySqlConnectionStringBuilder CreateSha256ConnectionStringBuilder()
6453 }
6554
6655 // tests can run much slower in CI environments
67- public static int TimeoutDelayFactor { get ; } = ( Environment . GetEnvironmentVariable ( "APPVEYOR" ) == "True" || Environment . GetEnvironmentVariable ( "TRAVIS" ) == "true" ) ? 6 : 1 ;
56+ public static int TimeoutDelayFactor { get ; } = Environment . GetEnvironmentVariable ( "APPVEYOR" ) == "True" || Environment . GetEnvironmentVariable ( "TRAVIS" ) == "true" ? 6 : 1 ;
6857 }
6958}
You can’t perform that action at this time.
0 commit comments