Click here to Skip to main content
15,894,017 members
Articles / Desktop Programming / WPF

Iron Web Analyzer

Rate me:
Please Sign up or sign in to vote.
4.83/5 (9 votes)
26 May 2010CPOL5 min read 39.4K   3.4K   37  
Analyze website content for Search Engine Optimization and technical problems (using Iron Python)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebAnalyzer.UrlInfo
{
    /// <summary>
    /// Provide information about a message
    /// </summary>
    public class UrlMessage
    {
        /// <summary>
        /// Create new message with specific information
        /// </summary>
        /// <param name="AnalyzerName">Analyzer Name</param>
        /// <param name="Description">The body text of message</param>
        /// <param name="MessageType">Type of message</param>
        public UrlMessage(string URL, string AnalyzerName, string Description, MessageTypes MessageType)
        {
            this.AnalyzerName = AnalyzerName;
            this.Description = Description;
            this.MessageType = MessageType;
            this.URL = URL;
        }

        /// <summary>
        /// Create new message with specific information
        /// </summary>
        /// <param name="AnalyzerName">Analyzer Name</param>
        /// <param name="Descripion">Description of message</param>
        /// <param name="MessageType">Type of message</param>
        /// <param name="LineNumber">Line number that message point to</param>
        /// <param name="LinePosition">Line position that message point to</param>
        public UrlMessage(string URL, string AnalyzerName, string Descripion, MessageTypes MessageType, int LineNumber, int LinePosition)
            : this(URL, AnalyzerName, Descripion, MessageType)
        {
            this.LineNumber = LineNumber;
            this.LinePosition = LinePosition;
        }

        /// <summary>
        /// Gets name of analyzers produced current message
        /// </summary>
        public string AnalyzerName { get; private set; }

        /// <summary>
        /// Gets text of current message
        /// </summary>
        public string Description { get; private set; }

        /// <summary>
        /// Gets importance level of current message
        /// </summary>
        public MessageTypes MessageType { get; private set; }

        /// <summary>
        /// Get the line number current message point to
        /// </summary>
        public int LineNumber { get; private set; }

        /// <summary>
        /// Get the line position number that current message point to
        /// </summary>
        public int LinePosition { get; private set; }

        /// <summary>
        /// Gets the URL current message is own by
        /// </summary>
        public string URL { get; private set; }

        /// <summary>
        /// Return String represent current message
        /// </summary>
        /// <returns>String represent current message</returns>
        public override string ToString()
        {
            return Description;
        }
    }

    /// <summary>
    /// Provide different importance levels
    /// </summary>
    public enum MessageTypes
    {
        /// <summary>
        /// Indicate the message just tell something
        /// </summary>
        Normal,
        /// <summary>
        /// Indicate it's better to pay attention to message
        /// </summary>
        Warning,
        /// <summary>
        /// Indicate very important message
        /// </summary>
        Error
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Iran (Islamic Republic of) Iran (Islamic Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions