public bool LinksEquals(URL url, URL url2) { URL.AbsURL oneh = url.url_main; URL.AbsURL twoh = url2.url_main; string one = oneh.scheme + "://" + oneh.host + oneh.path + oneh.file + oneh.query; string two = twoh.scheme + "://" + twoh.host + twoh.path + twoh.file + twoh.query; return(one == two); }
/// <summary> /// Checks if two urls are equal, /// one contained in an <see cref="Asset"/> and the other in an <see cref="URL"/> /// </summary> /// <param name="asset">Asset class containing a url </param> /// <param name="url">URL class</param> /// <returns>True if both URLs are equal</returns> public bool AssetsCoincidence(Asset asset, URL url) { URL.AbsURL org_url = asset.org_url.url_main; URL.AbsURL final_url = asset.final_url.url_main; string org = org_url.scheme + "://" + org_url.host + org_url.path + org_url.file + org_url.query; string final = final_url.scheme + "://" + final_url.host + final_url.path + final_url.file + final_url.query; string str_url = url.url_main.scheme + "://" + url.url_main.host + url.url_main.path + url.url_main.file + url.url_main.query; return(org == str_url || final == str_url); }
/// <summary> /// Checks if two urls are equal, /// one contained in an <see cref="Page"/> and the other in an <see cref="URL"/> /// </summary> /// <param name="asset">Asset class containing a url </param> /// <param name="url">URL class</param> /// <returns>True if both URLs are equal</returns> bool LinksCoincidence(Page page, URL url) { URL.AbsURL org_url = page.org_url.url_main; URL.AbsURL final_url = page.final_url.url_main; string org = org_url.scheme + "://" + org_url.host + org_url.path + org_url.file + org_url.query; string final = final_url.scheme + "://" + final_url.host + final_url.path + final_url.file + final_url.query; string str_url = url.url_main.scheme + "://" + url.url_main.host + url.url_main.path + url.url_main.file + url.url_main.query; return(org == str_url || final == str_url); }