개정판 566f0526
Image 밝기 & 색 농도 조절
Change-Id: I80feb7c7a64fbaf8d1d85a32bdf8baa813be2d4c
CommonLib/DNSHelper.cs | ||
---|---|---|
34 | 34 |
{ |
35 | 35 |
IPHostEntry result = null; |
36 | 36 |
|
37 |
try
|
|
37 |
await Task.Factory.StartNew(() =>
|
|
38 | 38 |
{ |
39 |
var ipaddress = CommonLib.DNSHelper.GetDnsAdress(); |
|
40 |
|
|
41 |
await Task.Factory.StartNew(() => |
|
39 |
try |
|
42 | 40 |
{ |
41 |
var ipaddress = CommonLib.DNSHelper.GetDnsAdress(); |
|
42 |
|
|
43 | 43 |
result = Dns.GetHostEntry(ipaddress); |
44 |
}); |
|
45 |
} |
|
46 |
catch (System.Net.Sockets.SocketException ex) |
|
47 |
{ |
|
48 |
if (ex.SocketErrorCode == System.Net.Sockets.SocketError.HostNotFound) |
|
44 |
} |
|
45 |
catch (System.Net.Sockets.SocketException ex) |
|
49 | 46 |
{ |
50 |
|
|
47 |
if (ex.SocketErrorCode == System.Net.Sockets.SocketError.HostNotFound) |
|
48 |
{ |
|
49 |
System.Diagnostics.Debug.WriteLine("DNS SocketError"); |
|
50 |
result = null; |
|
51 |
} |
|
51 | 52 |
} |
52 |
} |
|
53 |
catch (Exception ex) |
|
54 |
{ |
|
55 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
|
56 |
} |
|
53 |
catch (Exception ex) |
|
54 |
{ |
|
55 |
throw ex; |
|
56 |
} |
|
57 |
}); |
|
58 |
|
|
59 |
System.Diagnostics.Debug.WriteLine("DNS END"); |
|
57 | 60 |
|
58 | 61 |
return result; |
59 | 62 |
} |
내보내기 Unified diff