/// <summary>
        ///     Checks if the current browser is at the given page
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="document"></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.UrlsAreEqual(ProcessUrlArguments(navigationInfo.Url, null), document.Document.Uri));
        }