예제 #1
0
        public async Task <string> GetObjectSpecificationAsHtml(string database, string project, string layer, string lcid, string target, string spec)
        {
            var tmp = await m_ComosWebOffline.GetObjectSpecificationAsHtml(database, project, layer, lcid, target, spec);

            if (tmp == null)
            {
                tmp = await m_ComosWebOnline.GetObjectSpecificationAsHtml(database, project, layer, lcid, target, spec);

                if (tmp != null)
                {
                    var    url    = m_Url + "ui/dbs/" + database + "/projects/" + project + "/objects/" + target + "/specifications/" + spec + "/html?lcid=" + lcid + "&overlayid=" + layer;
                    string output = Newtonsoft.Json.JsonConvert.SerializeObject(tmp);
                    m_Database.WriteUrlCache(url, output);
                }
            }
            return(tmp);
        }
예제 #2
0
        public async Task <string> GetObjectSpecificationAsHtml(string database, string project, string layer, string lcid, string target, string spec)
        {
            string tmp = null;

            if (m_Platform.IsOnline)
            {
                tmp = await m_ComosWebOnline.GetObjectSpecificationAsHtml(database, project, layer, lcid, target, spec);

                if (tmp != null)
                {
                    var url = m_Url + "ui/dbs/" + database + "/projects/" + project + "/objects/" + target + "/specifications/" + spec + "/html?lcid=" + lcid + "&overlayid=" + layer;
                    m_Database.WriteUrlCache(url, tmp);
                    return(tmp);
                }
            }
            string result = await m_ComosWebOffline.GetObjectSpecificationAsHtml(database, project, layer, lcid, target, spec);

            //if (string.Compare(result, tmp) != 0)
            //{
            //    throw new Exception();
            //}
            return(result);
        }