개정판 150747cb
issue #0001: ServiceStation db 접속 불가시 종료현상 수정
Change-Id: I2eb4839e429fdbb65c3491ff40cdbe39f7d1bce1
ConvertService/ServiceBase/Markus.Service.Extensions/Helper/ConfigHelper.cs | ||
---|---|---|
12 | 12 |
{ |
13 | 13 |
public static ConfigParser AppConfig(string ConfigFileName) |
14 | 14 |
{ |
15 |
string startDir = AppDomain.CurrentDomain.BaseDirectory;
|
|
16 |
string configFilePath = "";
|
|
15 |
var startDir = AppDomain.CurrentDomain.BaseDirectory;
|
|
16 |
var configFilePath = $"{System.IO.Path.Combine(startDir, ConfigFileName)}";
|
|
17 | 17 |
|
18 |
if (!System.IO.Path.IsPathRooted(ConfigFileName)) |
|
19 |
{ |
|
20 |
configFilePath = $"{System.IO.Path.Combine(startDir, ConfigFileName)}"; |
|
21 |
} |
|
22 |
else |
|
23 |
{ |
|
24 |
configFilePath = ConfigFileName; |
|
25 |
} |
|
26 |
|
|
27 |
if(!System.IO.File.Exists(configFilePath)) |
|
18 |
if (!System.IO.File.Exists(configFilePath)) |
|
28 | 19 |
{ |
29 | 20 |
throw new Exception($"Config File Not Found. {configFilePath}"); |
30 | 21 |
} |
31 | 22 |
|
32 |
return new ConfigParser(configFilePath,
|
|
23 |
return new ConfigParser(configFilePath, |
|
33 | 24 |
new ConfigParserSettings |
34 | 25 |
{ |
35 | 26 |
MultiLineValues = MultiLineValues.Simple | MultiLineValues.AllowValuelessKeys | MultiLineValues.QuoteDelimitedValues, |
내보내기 Unified diff