Exemple #1
0
        //-------------------------------------------------------------------------------
        //-------------------------------------------------------------------------------
        internal bool UrlReferencesFragmentDocument(HyperlinkReference Href)
        {
            if (Href.UrlSpecified == false)
            {
                return(false);
            }
            string DocFullPath = Path.GetFullPath(this.Document.Filename);
            string HrefFullPathString;

            if (Href.Url.IndexOf(Path.DirectorySeparatorChar) == -1)
            {
                HrefFullPathString = this.Document.Path + Path.DirectorySeparatorChar + Href.Url;
            }
            else
            {
                HrefFullPathString = Href.Url;
            }
            string HrefFullPath = Path.GetFullPath(HrefFullPathString);

            if (DocFullPath.Equals(HrefFullPath) == true)
            {
                return(true);
            }
            return(false);
        }
Exemple #2
0
 /// <summary>
 /// Class constructor. This constructor will store a message and an exception.
 /// </summary>
 /// <param name="hyperlinkReference">
 /// The hyperlink reference containing the error being reported.
 /// </param>
 /// <param name="message">
 /// The message to be stored in the validation error.
 /// </param>
 /// <param name="exception">
 /// The exception to be stored in the validation error.
 /// </param>
 internal HyperlinkReferenceValidationError(HyperlinkReference hyperlinkReference, string message, Exception exception)
     : base(message, exception)
 {
     this.HyperlinkReference = HyperlinkReference;
 }
Exemple #3
0
 /// <summary>
 /// Class constructor. This constructor will store a message and will automatically set the
 /// Exception property to a null value.
 /// </summary>
 /// <param name="hyperlinkReference">
 /// The hyperlink reference containing the error being reported.
 /// </param>
 /// <param name="message">
 /// The message to be stored in the validation error.
 /// </param>
 internal HyperlinkReferenceValidationError(HyperlinkReference hyperlinkReference, string message)
     : base(message)
 {
     this.HyperlinkReference = hyperlinkReference;
 }