Esempio n. 1
0
        /// <summary>
        /// For example, in http://yahoo.com/lala/, nextExistingPart(UrlPart.HOST) would return UrlPart.PATH
        /// @param urlPart The current url part
        /// @return Returns the next part; if there is no existing next part, it returns null
        /// </summary>
        /// <param name="urlPart"></param>
        /// <returns></returns>
        private UrlPart?NextExistingPart(UrlPart urlPart)
        {
            var nextPart = urlPart.GetNextPart();

            if (Exists(nextPart))
            {
                return(nextPart);
            }

            if (nextPart == null)
            {
                return(null);
            }

            return(NextExistingPart(nextPart.Value));
        }