public async Task <List <CSpecification> > GetObjectSpecification(string database, string projectuid, string layer, string lcid, string target) { if (m_Platform.IsOnline) { var tmp = await m_ComosWebOnline.GetObjectSpecification(database, projectuid, layer, lcid, target); if (tmp != null) { string url = m_Url + "dbs/" + database + "/projects/" + projectuid + "/objects/" + target + "/specifications?lcid=" + lcid + "&overlayid=" + layer; string output = Newtonsoft.Json.JsonConvert.SerializeObject(tmp); m_Database.WriteUrlCache(url, output); return(tmp); } } return(await m_ComosWebOffline.GetObjectSpecification(database, projectuid, layer, lcid, target)); }
//[Ignore] public async Task GetObjectSpecifications() { using (ComosWeb cw = GetComosWeb(true)) { var layer = await cw.GetWorkingLayerByUrl("db1/projects/U:2:A3BQHFA8AR:/wl/U:42:A3WXEAM61M:/details"); var o = await cw.GetObjectBySystemFullName(layer, "A10|A90|A30|A30| » 6/8/2017 09:08:35"); var specs = await cw.GetObjectSpecification(layer, "1033", o.UID); foreach (var spec in specs) { var html = await cw.GetObjectSpecificationAsHtml(layer, "1033", o.UID, spec.Name); System.IO.File.WriteAllText("attributes." + spec.Description + ".txt", html); } var value = await cw.Logout(); } }