Example #1
0
 public static bool CheckUriEquality(Uri thisUri, Uri otherUri)
 {
     if (thisUri == (Uri)null && otherUri == (Uri)null)
     {
         return(true);
     }
     if (thisUri == (Uri)null ^ otherUri == (Uri)null)
     {
         return(false);
     }
     if (object.Equals((object)thisUri, (object)otherUri))
     {
         return(true);
     }
     if (UriHelperUtility.IsSdkUri(thisUri) && UriHelperUtility.IsSdkUri(otherUri))
     {
         return(UriHelperUtility.CheckSdkUriEquality(thisUri, otherUri));
     }
     if (thisUri.IsAbsoluteUri && otherUri.IsAbsoluteUri)
     {
         return(Uri.Compare(thisUri, otherUri, UriComponents.AbsoluteUri, UriFormat.UriEscaped, StringComparison.OrdinalIgnoreCase) == 0);
     }
     if (!thisUri.IsAbsoluteUri && !otherUri.IsAbsoluteUri)
     {
         return(string.Compare(thisUri.ToString(), otherUri.ToString(), StringComparison.OrdinalIgnoreCase) == 0);
     }
     return(false);
 }