개정판 19391ad3
issue #000: symbol external ip 치환 추가
Change-Id: I53a7b13b0d091781d45efceb7c84042c9cc45bfa
CommonLib/Common.cs | ||
---|---|---|
63 | 63 |
} |
64 | 64 |
return result; |
65 | 65 |
} |
66 |
public static string IPReplace(string url, bool isExternal) |
|
67 |
{ |
|
68 |
string result = url; |
|
69 |
try |
|
70 |
{ |
|
71 |
if (isExternal) |
|
72 |
{ |
|
73 |
System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(512); |
|
74 |
GetPrivateProfileString("External", "IP", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini")); |
|
75 |
string external_ip = stringBuilder.ToString(); |
|
76 |
stringBuilder = new StringBuilder(); |
|
77 |
GetPrivateProfileString("Internal", "IP", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini")); |
|
78 |
string internal_ip = stringBuilder.ToString(); |
|
79 |
result = result.Replace(internal_ip, external_ip); |
|
80 |
} |
|
81 |
} |
|
82 |
catch (Exception) |
|
83 |
{ |
|
84 |
throw; |
|
85 |
} |
|
86 |
|
|
87 |
return result; |
|
88 |
} |
|
66 | 89 |
public static string GetAlertMessageString(string section, string key, string def) |
67 | 90 |
{ |
68 | 91 |
System.Text.StringBuilder strbuilder = new System.Text.StringBuilder(1024); |
내보내기 Unified diff