Add SystemInfo to AboutPage
This commit is contained in:
@@ -61,6 +61,7 @@ namespace MarketData.Service
|
||||
{
|
||||
return null==baseUri?"":baseUri.ToString();
|
||||
}
|
||||
|
||||
public bool Ping(String url)
|
||||
{
|
||||
lock(this)
|
||||
@@ -98,6 +99,30 @@ namespace MarketData.Service
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ServiceResult GetSystemInfo()
|
||||
{
|
||||
lock(this)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(!IsNetworkAvailable())return new ServiceResult(false,"No network.");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("/api/Ping/GetSystemInfo");
|
||||
String json = httpClient.GetStringAsync(sb.ToString()).Result;
|
||||
json=ToConformimgJson(json);
|
||||
String accessToken = JsonConvert.DeserializeObject<String>(json);
|
||||
return new ServiceResult(accessToken);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
exceptions.Add(exception);
|
||||
Debug.WriteLine(exception.ToString());
|
||||
return new ServiceResult(false,exception.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ServiceResult Login(String user, String password)
|
||||
{
|
||||
lock(this)
|
||||
|
||||
Reference in New Issue
Block a user