/// <summary> /// Checks if the current browser is at the given page /// </summary> /// <param name="document"></param> /// <param name="pageType"></param> /// <returns></returns> public static bool IsAtPage(this INavigationService document, Type pageType) { PageDescriptionAttribute navigationInfo = TryGetPageDescriptionAttribute(pageType); if (navigationInfo == null) { throw new InvalidOperationException("The page type does not specify its uri"); } return(UrlHelpers.MatchUrlPattern(navigationInfo.PageUrl, document.Document.Uri)); }