Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlAttributes.cs
Go to the documentation of this file.
3
5
6public class XmlAttributes
7{
9
11
13
15
17
19
21
22 private bool _xmlIgnore;
23
24 private bool _xmlns;
25
26 private object _xmlDefaultValue;
27
29
31
33
35
37 {
38 get
39 {
41 if (_xmlElements.Count > 0)
42 {
44 }
45 if (_xmlArrayItems.Count > 0)
46 {
48 }
49 if (_xmlAnyElements.Count > 0)
50 {
52 }
53 if (_xmlArray != null)
54 {
56 }
57 if (_xmlAttribute != null)
58 {
60 }
61 if (_xmlText != null)
62 {
64 }
65 if (_xmlEnum != null)
66 {
68 }
69 if (_xmlRoot != null)
70 {
72 }
73 if (_xmlType != null)
74 {
76 }
77 if (_xmlAnyAttribute != null)
78 {
80 }
81 if (_xmlChoiceIdentifier != null)
82 {
83 xmlAttributeFlags |= XmlAttributeFlags.ChoiceIdentifier;
84 }
85 if (_xmlns)
86 {
87 xmlAttributeFlags |= XmlAttributeFlags.XmlnsDeclarations;
88 }
89 return xmlAttributeFlags;
90 }
91 }
92
94
96 {
97 get
98 {
99 return _xmlAttribute;
100 }
101 set
102 {
104 }
105 }
106
108 {
109 get
110 {
111 return _xmlEnum;
112 }
113 set
114 {
115 _xmlEnum = value;
116 }
117 }
118
120 {
121 get
122 {
123 return _xmlText;
124 }
125 set
126 {
127 _xmlText = value;
128 }
129 }
130
132 {
133 get
134 {
135 return _xmlArray;
136 }
137 set
138 {
140 }
141 }
142
144
145 public object? XmlDefaultValue
146 {
147 get
148 {
149 return _xmlDefaultValue;
150 }
151 set
152 {
154 }
155 }
156
157 public bool XmlIgnore
158 {
159 get
160 {
161 return _xmlIgnore;
162 }
163 set
164 {
166 }
167 }
168
170 {
171 get
172 {
173 return _xmlType;
174 }
175 set
176 {
177 _xmlType = value;
178 }
179 }
180
182 {
183 get
184 {
185 return _xmlRoot;
186 }
187 set
188 {
189 _xmlRoot = value;
190 }
191 }
192
194
196 {
197 get
198 {
199 return _xmlAnyAttribute;
200 }
201 set
202 {
204 }
205 }
206
208
209 public bool Xmlns
210 {
211 get
212 {
213 return _xmlns;
214 }
215 set
216 {
217 _xmlns = value;
218 }
219 }
220
222 {
223 }
224
226 {
227 object[] customAttributes = provider.GetCustomAttributes(inherit: false);
229 for (int i = 0; i < customAttributes.Length; i++)
230 {
232 {
233 _xmlIgnore = true;
234 break;
235 }
237 {
239 }
241 {
243 }
245 {
247 if ((xmlAnyElementAttribute2.Name == null || xmlAnyElementAttribute2.Name.Length == 0) && xmlAnyElementAttribute2.GetNamespaceSpecified() && xmlAnyElementAttribute2.Namespace == null)
248 {
250 }
251 else
252 {
254 }
255 }
257 {
259 }
261 {
263 }
265 {
267 }
269 {
271 }
273 {
275 }
277 {
279 }
281 {
283 }
285 {
287 }
289 {
291 }
293 {
294 _xmlns = true;
295 }
296 }
297 if (_xmlIgnore)
298 {
302 _xmlDefaultValue = null;
303 _xmlAttribute = null;
304 _xmlArray = null;
305 _xmlText = null;
306 _xmlEnum = null;
307 _xmlType = null;
308 _xmlAnyAttribute = null;
310 _xmlns = false;
311 }
312 else if (xmlAnyElementAttribute != null)
313 {
315 }
316 }
317
318 internal static object GetAttr(MemberInfo memberInfo, Type attrType)
319 {
320 object[] customAttributes = memberInfo.GetCustomAttributes(attrType, inherit: false);
321 if (customAttributes.Length == 0)
322 {
323 return null;
324 }
325 return customAttributes[0];
326 }
327}
readonly XmlAnyElementAttributes _xmlAnyElements
XmlChoiceIdentifierAttribute? XmlChoiceIdentifier
XmlAttributes(ICustomAttributeProvider provider)
XmlAnyAttributeAttribute? XmlAnyAttribute
readonly XmlArrayItemAttributes _xmlArrayItems
readonly XmlChoiceIdentifierAttribute _xmlChoiceIdentifier
XmlAnyElementAttributes XmlAnyElements
static object GetAttr(MemberInfo memberInfo, Type attrType)
readonly XmlElementAttributes _xmlElements
XmlAnyAttributeAttribute _xmlAnyAttribute
int Add(XmlElementAttribute? attribute)