public async Task<SiteResult> AnalyzeUrl(string url) { var response = await m_client.GetAsync("/api/v2/scan?url=" + url); var content = await response.Content.ReadAsStringAsync(); var result = new SiteResult(content); return result; }
void UpdateItem(ListViewItem item, string shortUrl, SiteResult result) { item.ForeColor = Color.Black; item.SubItems.Clear(); item.SubItems.Add(""); item.SubItems.Add(result.checkBrowserDetectionData.passed.ToString()); item.SubItems.Add(result.checkCSSPrefixesData.passed.ToString()); item.SubItems.Add(result.checkEdgeData.passed.ToString()); item.SubItems.Add(result.checkJsLibsData.passed.ToString()); item.SubItems.Add(result.checkPluginFreeData.passed.ToString()); item.SubItems.Add(result.checkMarkupData.passed.ToString()); item.Text = shortUrl; }
public void Update(SiteResult result) { int index = -1; string url = result.url; if(!m_idxWebsiteName.ContainsKey(url)) { AddWebsite(url); } index = m_idxWebsiteName[url]; m_websites[index] = result; }