Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ XmlAttributes() [2/2]

System.Xml.Serialization.XmlAttributes.XmlAttributes ( ICustomAttributeProvider provider)
inline

Definition at line 225 of file XmlAttributes.cs.

226 {
227 object[] customAttributes = provider.GetCustomAttributes(inherit: false);
228 XmlAnyElementAttribute xmlAnyElementAttribute = null;
229 for (int i = 0; i < customAttributes.Length; i++)
230 {
231 if (customAttributes[i] is XmlIgnoreAttribute || customAttributes[i] is ObsoleteAttribute)
232 {
233 _xmlIgnore = true;
234 break;
235 }
236 if (customAttributes[i] is XmlElementAttribute)
237 {
238 _xmlElements.Add((XmlElementAttribute)customAttributes[i]);
239 }
240 else if (customAttributes[i] is XmlArrayItemAttribute)
241 {
242 _xmlArrayItems.Add((XmlArrayItemAttribute)customAttributes[i]);
243 }
244 else if (customAttributes[i] is XmlAnyElementAttribute)
245 {
246 XmlAnyElementAttribute xmlAnyElementAttribute2 = (XmlAnyElementAttribute)customAttributes[i];
247 if ((xmlAnyElementAttribute2.Name == null || xmlAnyElementAttribute2.Name.Length == 0) && xmlAnyElementAttribute2.GetNamespaceSpecified() && xmlAnyElementAttribute2.Namespace == null)
248 {
250 }
251 else
252 {
253 _xmlAnyElements.Add((XmlAnyElementAttribute)customAttributes[i]);
254 }
255 }
257 {
259 }
260 else if (customAttributes[i] is XmlAttributeAttribute)
261 {
262 _xmlAttribute = (XmlAttributeAttribute)customAttributes[i];
263 }
264 else if (customAttributes[i] is XmlArrayAttribute)
265 {
266 _xmlArray = (XmlArrayAttribute)customAttributes[i];
267 }
268 else if (customAttributes[i] is XmlTextAttribute)
269 {
270 _xmlText = (XmlTextAttribute)customAttributes[i];
271 }
272 else if (customAttributes[i] is XmlEnumAttribute)
273 {
274 _xmlEnum = (XmlEnumAttribute)customAttributes[i];
275 }
276 else if (customAttributes[i] is XmlRootAttribute)
277 {
278 _xmlRoot = (XmlRootAttribute)customAttributes[i];
279 }
280 else if (customAttributes[i] is XmlTypeAttribute)
281 {
282 _xmlType = (XmlTypeAttribute)customAttributes[i];
283 }
284 else if (customAttributes[i] is XmlAnyAttributeAttribute)
285 {
286 _xmlAnyAttribute = (XmlAnyAttributeAttribute)customAttributes[i];
287 }
288 else if (customAttributes[i] is XmlChoiceIdentifierAttribute)
289 {
290 _xmlChoiceIdentifier = (XmlChoiceIdentifierAttribute)customAttributes[i];
291 }
292 else if (customAttributes[i] is XmlNamespaceDeclarationsAttribute)
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 }
readonly XmlAnyElementAttributes _xmlAnyElements
readonly XmlArrayItemAttributes _xmlArrayItems
readonly XmlChoiceIdentifierAttribute _xmlChoiceIdentifier
readonly XmlElementAttributes _xmlElements
XmlAnyAttributeAttribute _xmlAnyAttribute
int Add(XmlElementAttribute? attribute)

References System.Xml.Serialization.XmlAttributes._xmlAnyAttribute, System.Xml.Serialization.XmlAttributes._xmlAnyElements, System.Xml.Serialization.XmlAttributes._xmlArray, System.Xml.Serialization.XmlAttributes._xmlArrayItems, System.Xml.Serialization.XmlAttributes._xmlAttribute, System.Xml.Serialization.XmlAttributes._xmlChoiceIdentifier, System.Xml.Serialization.XmlAttributes._xmlDefaultValue, System.Xml.Serialization.XmlAttributes._xmlElements, System.Xml.Serialization.XmlAttributes._xmlEnum, System.Xml.Serialization.XmlAttributes._xmlIgnore, System.Xml.Serialization.XmlAttributes._xmlns, System.Xml.Serialization.XmlAttributes._xmlRoot, System.Xml.Serialization.XmlAttributes._xmlText, System.Xml.Serialization.XmlAttributes._xmlType, System.Xml.Serialization.XmlAnyElementAttributes.Add(), System.Xml.Serialization.XmlArrayItemAttributes.Add(), System.Xml.Serialization.XmlElementAttributes.Add(), System.Collections.CollectionBase.Clear(), and System.Xml.Dictionary.