Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlParserContext.cs
Go to the documentation of this file.
2using System.Text;
3
4namespace System.Xml;
5
6public class XmlParserContext
7{
9
11
12 private string _docTypeName = string.Empty;
13
14 private string _pubId = string.Empty;
15
16 private string _sysId = string.Empty;
17
18 private string _internalSubset = string.Empty;
19
20 private string _xmlLang = string.Empty;
21
23
24 private string _baseURI = string.Empty;
25
27
29 {
30 get
31 {
32 return _nt;
33 }
34 set
35 {
36 _nt = value;
37 }
38 }
39
41 {
42 get
43 {
44 return _nsMgr;
45 }
46 set
47 {
48 _nsMgr = value;
49 }
50 }
51
52 public string DocTypeName
53 {
54 get
55 {
56 return _docTypeName;
57 }
59 set
60 {
61 _docTypeName = ((value == null) ? string.Empty : value);
62 }
63 }
64
65 public string PublicId
66 {
67 get
68 {
69 return _pubId;
70 }
72 set
73 {
74 _pubId = ((value == null) ? string.Empty : value);
75 }
76 }
77
78 public string SystemId
79 {
80 get
81 {
82 return _sysId;
83 }
85 set
86 {
87 _sysId = ((value == null) ? string.Empty : value);
88 }
89 }
90
91 public string BaseURI
92 {
93 get
94 {
95 return _baseURI;
96 }
98 set
99 {
100 _baseURI = ((value == null) ? string.Empty : value);
101 }
102 }
103
104 public string InternalSubset
105 {
106 get
107 {
108 return _internalSubset;
109 }
111 set
112 {
113 _internalSubset = ((value == null) ? string.Empty : value);
114 }
115 }
116
117 public string XmlLang
118 {
119 get
120 {
121 return _xmlLang;
122 }
124 set
125 {
126 _xmlLang = ((value == null) ? string.Empty : value);
127 }
128 }
129
131 {
132 get
133 {
134 return _xmlSpace;
135 }
136 set
137 {
139 }
140 }
141
143 {
144 get
145 {
146 return _encoding;
147 }
148 set
149 {
151 }
152 }
153
154 internal bool HasDtdInfo
155 {
156 get
157 {
158 if (!(_internalSubset != string.Empty) && !(_pubId != string.Empty))
159 {
160 return _sysId != string.Empty;
161 }
162 return true;
163 }
164 }
165
166 public XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? xmlLang, XmlSpace xmlSpace)
167 : this(nt, nsMgr, null, null, null, null, string.Empty, xmlLang, xmlSpace)
168 {
169 }
170
172 : this(nt, nsMgr, null, null, null, null, string.Empty, xmlLang, xmlSpace, enc)
173 {
174 }
175
176 public XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? docTypeName, string? pubId, string? sysId, string? internalSubset, string? baseURI, string? xmlLang, XmlSpace xmlSpace)
177 : this(nt, nsMgr, docTypeName, pubId, sysId, internalSubset, baseURI, xmlLang, xmlSpace, null)
178 {
179 }
180
181 public XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? docTypeName, string? pubId, string? sysId, string? internalSubset, string? baseURI, string? xmlLang, XmlSpace xmlSpace, Encoding? enc)
182 {
183 if (nsMgr != null)
184 {
185 if (nt == null)
186 {
187 _nt = nsMgr.NameTable;
188 }
189 else
190 {
191 if (nt != nsMgr.NameTable)
192 {
193 throw new XmlException(System.SR.Xml_NotSameNametable, string.Empty);
194 }
195 _nt = nt;
196 }
197 }
198 else
199 {
200 _nt = nt;
201 }
202 _nsMgr = nsMgr;
203 _docTypeName = ((docTypeName == null) ? string.Empty : docTypeName);
204 _pubId = ((pubId == null) ? string.Empty : pubId);
205 _sysId = ((sysId == null) ? string.Empty : sysId);
206 _internalSubset = ((internalSubset == null) ? string.Empty : internalSubset);
207 _baseURI = ((baseURI == null) ? string.Empty : baseURI);
208 _xmlLang = ((xmlLang == null) ? string.Empty : xmlLang);
209 _xmlSpace = xmlSpace;
210 _encoding = enc;
211 }
212}
static string Xml_NotSameNametable
Definition SR.cs:130
Definition SR.cs:7
XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? xmlLang, XmlSpace xmlSpace, Encoding? enc)
XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? xmlLang, XmlSpace xmlSpace)
XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? docTypeName, string? pubId, string? sysId, string? internalSubset, string? baseURI, string? xmlLang, XmlSpace xmlSpace)
XmlNamespaceManager? NamespaceManager
XmlParserContext(XmlNameTable? nt, XmlNamespaceManager? nsMgr, string? docTypeName, string? pubId, string? sysId, string? internalSubset, string? baseURI, string? xmlLang, XmlSpace xmlSpace, Encoding? enc)