Ejemplo n.º 1
0
 public bool InsertTagResult(TagResult objTagResult)
 {
     if (objTagResult != null)
     {
         InsertTagHierarchy(objTagResult.lstTagsHierarchy);
         InsertTag(objTagResult.lstTagNames);
         InsertTitle(objTagResult.lstTitleNames);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
        public static async Task <bool> GetTagsAll(TagResult objResult)
        {
            string strTagsAllPath = AppSetting.API_URL_TAGS;

            HttpResponseMessage resp = await client.GetAsync(strTagsAllPath);

            if (resp.IsSuccessStatusCode)
            {
                Stream received = await resp.Content.ReadAsStreamAsync();

                StreamReader readStream = new StreamReader(received);
                string       jsonString = readStream.ReadToEnd();

                JObject jo = JObject.Parse(jsonString);
                objResult.lstTagsHierarchy = PopulateTagHierarchy(jo);
                objResult.lstTagNames      = PopulateTagNames(jo);
                objResult.lstTitleNames    = PopulateTitleNames(jo);
                return(true);
            }
            return(false);
        }