public static bool IsOwaUrl(Uri requestUrl, OwaUrl owaUrl, bool exactMatch, bool useLocal)
        {
            if (requestUrl == null)
            {
                throw new ArgumentNullException("requestUrl");
            }
            if (owaUrl == null)
            {
                throw new ArgumentNullException("owaUrl");
            }
            int    length = owaUrl.ImplicitUrl.Length;
            string text   = useLocal ? requestUrl.LocalPath : requestUrl.PathAndQuery;
            bool   flag   = string.Compare(text, 0, owaUrl.ImplicitUrl, 0, length, StringComparison.OrdinalIgnoreCase) == 0;

            if (exactMatch)
            {
                flag = (flag && length == text.Length);
            }
            return(flag);
        }
 public static bool IsOwaUrl(Uri requestUrl, OwaUrl owaUrl, bool exactMatch)
 {
     return(RequestDispatcherUtilities.IsOwaUrl(requestUrl, owaUrl, exactMatch, true));
 }