public static async Task <List <string> > Getappendixnames(string url) { try { string result = await Task.Run(() => WebApiCaller.HttpGet(url, true)); JObject obj = JObject.Parse(result); string data = obj["data"].ToString(); return(JsonConvert.DeserializeObject <List <string> >(data)); } catch (Exception ex) { return(null); } }
public static async Task <List <DataSourceType> > GetDataSourceTypes() { try { string result = await Task.Run(() => WebApiCaller.HttpGet(ServiceConfig.BaseURL + ServiceConfig.datasourcetypeURL, true)); JObject obj = JObject.Parse(result); string data = obj["data"].ToString(); return(JsonConvert.DeserializeObject <List <DataSourceType> >(data)); } catch (Exception ex) { return(null); } }
//获取工程列表信息 // public static async Task <List <ProjectList> > GetProjectList() { try { //网络请求 string result = await Task.Run(() => WebApiCaller.HttpGet(ServiceConfig.BaseURL + ServiceConfig.projectlistURL, true)); JObject obj = JObject.Parse(result); string data = obj["data"].ToString(); return(JsonConvert.DeserializeObject <List <ProjectList> >(data)); } catch (Exception ex) { return(null); } }
public static async Task <List <EngineeringMap> > GetEMaps(string project) { try { //网络请求 string result = await Task.Run(() => WebApiCaller.HttpGet(ServiceConfig.BaseURL + string.Format(ServiceConfig.projectemapFormat, project), true)); JObject obj = JObject.Parse(result); string data = obj["data"].ToString(); return(JsonConvert.DeserializeObject <List <EngineeringMap> >(data)); } catch (Exception ex) { return(null); } }
//获取对象树信息 // public static async Task <List <TreeDefinition> > GetProjectTree(string project, string domain) { try { //网络请求 string result = await Task.Run(() => WebApiCaller.HttpGet(ServiceConfig.BaseURL + string.Format(ServiceConfig.projecttreeFormat, project, domain), true)); JObject obj = JObject.Parse(result); string data = obj["data"].ToString(); return(JsonConvert.DeserializeObject <List <TreeDefinition> >(data)); } catch (Exception ex) { return(null); } }