Merge pull request #5668 from kumpera/wasm-work-p4
[mono.git] / docs / HtmlAgilityPack / HtmlParseError.cs
1 // HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>\r
2 namespace HtmlAgilityPack\r
3 {\r
4     /// <summary>\r
5     /// Represents a parsing error found during document parsing.\r
6     /// </summary>\r
7     public class HtmlParseError\r
8     {\r
9         #region Fields\r
10 \r
11         private HtmlParseErrorCode _code;\r
12         private int _line;\r
13         private int _linePosition;\r
14         private string _reason;\r
15         private string _sourceText;\r
16         private int _streamPosition;\r
17 \r
18         #endregion\r
19 \r
20         #region Constructors\r
21 \r
22         internal HtmlParseError(\r
23             HtmlParseErrorCode code,\r
24             int line,\r
25             int linePosition,\r
26             int streamPosition,\r
27             string sourceText,\r
28             string reason)\r
29         {\r
30             _code = code;\r
31             _line = line;\r
32             _linePosition = linePosition;\r
33             _streamPosition = streamPosition;\r
34             _sourceText = sourceText;\r
35             _reason = reason;\r
36         }\r
37 \r
38         #endregion\r
39 \r
40         #region Properties\r
41 \r
42         /// <summary>\r
43         /// Gets the type of error.\r
44         /// </summary>\r
45         public HtmlParseErrorCode Code\r
46         {\r
47             get { return _code; }\r
48         }\r
49 \r
50         /// <summary>\r
51         /// Gets the line number of this error in the document.\r
52         /// </summary>\r
53         public int Line\r
54         {\r
55             get { return _line; }\r
56         }\r
57 \r
58         /// <summary>\r
59         /// Gets the column number of this error in the document.\r
60         /// </summary>\r
61         public int LinePosition\r
62         {\r
63             get { return _linePosition; }\r
64         }\r
65 \r
66         /// <summary>\r
67         /// Gets a description for the error.\r
68         /// </summary>\r
69         public string Reason\r
70         {\r
71             get { return _reason; }\r
72         }\r
73 \r
74         /// <summary>\r
75         /// Gets the the full text of the line containing the error.\r
76         /// </summary>\r
77         public string SourceText\r
78         {\r
79             get { return _sourceText; }\r
80         }\r
81 \r
82         /// <summary>\r
83         /// Gets the absolute stream position of this error in the document, relative to the start of the document.\r
84         /// </summary>\r
85         public int StreamPosition\r
86         {\r
87             get { return _streamPosition; }\r
88         }\r
89 \r
90         #endregion\r
91     }\r
92 }