[System.Reflection] CoreFX import for ParameterInfo type
[mono-project.git] / docs / HtmlAgilityPack / HtmlParseError.cs
blobd3d5e78ba196f46b6e4bf06cc975a49647cdf274
1 // HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
2 namespace HtmlAgilityPack
4 /// <summary>
5 /// Represents a parsing error found during document parsing.
6 /// </summary>
7 public class HtmlParseError
9 #region Fields
11 private HtmlParseErrorCode _code;
12 private int _line;
13 private int _linePosition;
14 private string _reason;
15 private string _sourceText;
16 private int _streamPosition;
18 #endregion
20 #region Constructors
22 internal HtmlParseError(
23 HtmlParseErrorCode code,
24 int line,
25 int linePosition,
26 int streamPosition,
27 string sourceText,
28 string reason)
30 _code = code;
31 _line = line;
32 _linePosition = linePosition;
33 _streamPosition = streamPosition;
34 _sourceText = sourceText;
35 _reason = reason;
38 #endregion
40 #region Properties
42 /// <summary>
43 /// Gets the type of error.
44 /// </summary>
45 public HtmlParseErrorCode Code
47 get { return _code; }
50 /// <summary>
51 /// Gets the line number of this error in the document.
52 /// </summary>
53 public int Line
55 get { return _line; }
58 /// <summary>
59 /// Gets the column number of this error in the document.
60 /// </summary>
61 public int LinePosition
63 get { return _linePosition; }
66 /// <summary>
67 /// Gets a description for the error.
68 /// </summary>
69 public string Reason
71 get { return _reason; }
74 /// <summary>
75 /// Gets the the full text of the line containing the error.
76 /// </summary>
77 public string SourceText
79 get { return _sourceText; }
82 /// <summary>
83 /// Gets the absolute stream position of this error in the document, relative to the start of the document.
84 /// </summary>
85 public int StreamPosition
87 get { return _streamPosition; }
90 #endregion