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

◆ CreateArrayElementsFromAttributes()

void System.Xml.Serialization.XmlReflectionImporter.CreateArrayElementsFromAttributes ( ArrayMapping arrayMapping,
XmlArrayItemAttributes attributes,
Type arrayElementType,
string arrayElementNs,
RecursionLimiter limiter )
inlineprivate

Definition at line 1509 of file XmlReflectionImporter.cs.

1510 {
1511 NameTable nameTable = new NameTable();
1512 int num = 0;
1513 while (attributes != null && num < attributes.Count)
1514 {
1515 XmlArrayItemAttribute xmlArrayItemAttribute = attributes[num];
1516 if (xmlArrayItemAttribute.NestingLevel == _arrayNestingLevel)
1517 {
1519 TypeDesc typeDesc = _typeScope.GetTypeDesc(type);
1520 ElementAccessor elementAccessor = new ElementAccessor();
1523 elementAccessor.Name = ((xmlArrayItemAttribute.ElementName.Length == 0) ? elementAccessor.Mapping.DefaultElementName : XmlConvert.EncodeLocalName(xmlArrayItemAttribute.ElementName));
1529 }
1530 num++;
1531 }
1532 arrayMapping.Elements = (ElementAccessor[])nameTable.ToArray(typeof(ElementAccessor));
1533 }
TypeModel GetTypeModel(Type type)
Definition ModelScope.cs:22
TypeDesc GetTypeDesc(string name, string ns)
Definition TypeScope.cs:224
static void CheckNullable(bool isNullable, TypeDesc typeDesc, TypeMapping mapping)
static void AddUniqueAccessor(INameScope scope, Accessor accessor)
static void CheckForm(XmlSchemaForm form, bool isQualified)

References System.Xml.Serialization.XmlReflectionImporter._arrayNestingLevel, System.Xml.Serialization.XmlReflectionImporter._modelScope, System.Xml.Serialization.XmlReflectionImporter._typeScope, System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(), System.Xml.Serialization.XmlReflectionImporter.CheckForm(), System.Xml.Serialization.XmlReflectionImporter.CheckNullable(), System.Collections.CollectionBase.Count, System.Xml.Dictionary, System.Xml.XmlConvert.EncodeLocalName(), System.Xml.Serialization.TypeScope.GetTypeDesc(), System.Xml.Serialization.ModelScope.GetTypeModel(), System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(), and System.type.

Referenced by System.Xml.Serialization.XmlReflectionImporter.ImportArrayLikeMapping().