20 writes to Elements
System.Private.Xml (20)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
456memberMapping.Elements = new ElementAccessor[] { element }; 1124Elements = arrayMapping.Elements,
System\Xml\Serialization\SoapReflectionImporter.cs (2)
709accessor.Elements = Array.Empty<ElementAccessor>(); 724accessor.Elements = new ElementAccessor[] { element };
System\Xml\Serialization\XmlReflectionImporter.cs (1)
1972accessor.Elements = (ElementAccessor[])elementList.ToArray(typeof(ElementAccessor));
System\Xml\Serialization\XmlSchemaImporter.cs (9)
210member.Elements = new ElementAccessor[] { accessor }; 776member.Elements = (ElementAccessor[])choiceElements.ToArray(typeof(ElementAccessor)); 870choiceIdentifier.Elements = new ElementAccessor[] { choiceAccessor }; 1139member.Elements = Array.Empty<ElementAccessor>(); 1172member.Elements = accessors; 1442member.Elements = new ElementAccessor[] { accessor }; 1468member.Elements = Array.Empty<ElementAccessor>(); 1499member.Elements = Array.Empty<ElementAccessor>(); 1562member.Elements = new ElementAccessor[] { xmlns };
System\Xml\Serialization\XmlSerializationReader.cs (3)
2799member.Elements = new ElementAccessor[] { element }; 3127memberMapping.Elements = arrayMapping.Elements; 4561memberMapping.Elements = arrayMapping.Elements;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
646member.Elements = new ElementAccessor[] { element }; 1247memberMapping.Elements = arrayMapping.Elements; 2860memberMapping.Elements = arrayMapping.Elements;
100 references to Elements
System.Private.Xml (100)
System\Xml\Serialization\Mappings.cs (4)
838if (Elements != null && Elements.Length > 0) 840if (!ElementsMatch(Elements, mapping.Elements))
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (15)
201for (int j = 0; j < mapping.Elements!.Length; j++) 203if (mapping.Elements[j].Any && mapping.Elements[j].Name.Length == 0) 225&& !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) 760for (int i = 0; i < m.Mapping.Elements!.Length; i++) 762ElementAccessor ele = m.Mapping.Elements[i]; 824ElementAccessor[] elements = anyElement.Elements!; 1396if (member.Mapping.Elements!.Length == 0) 1399TypeMapping? mapping = member.Mapping.Elements[0].Mapping; 1617for (int j = 0; j < mapping.Elements!.Length; j++) 1619if (mapping.Elements[j].Any && string.IsNullOrEmpty(mapping.Elements[j].Name)) 1634if (member.Source == null && mapping.TypeDesc.IsArrayLike && !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping))
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
626bool checkShouldPersist = m.CheckShouldPersist && (m.Elements!.Length > 0 || m.Text != null); 1282if (isRpc && member.IsReturnValue && member.Elements!.Length > 0) 1284WriteRpcResult(member.Elements[0].Name, string.Empty);
System\Xml\Serialization\SoapReflectionImporter.cs (1)
661member.Elements![0].IsNullable = false;
System\Xml\Serialization\XmlReflectionImporter.cs (18)
236if (mapping.Elements != null && mapping.Elements.Length > 0) 238mapping.Elements[0] = (ElementAccessor)ReconcileAccessor(mapping.Elements[0], _elements); 887if (member.Elements != null && member.Elements.Length != 0) 1393if (xmlReflectionMember.OverrideIsNullable && member.Elements!.Length > 0) 1394member.Elements[0].IsNullable = false; 1977if (accessor.TypeDesc.IsArrayLike && accessor.Elements.Length > 0 && !(accessor.Elements[0].Mapping is ArrayMapping)) 1978throw new InvalidOperationException(SR.Format(SR.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 1987accessor.ChoiceIdentifier.MemberIds = new string[accessor.Elements.Length]; 1988for (int i = 0; i < accessor.Elements.Length; i++) 1991ElementAccessor element = accessor.Elements[i]; 2215else if (!isSequence && member.Elements != null && member.Elements.Length > 0) 2217for (int i = 0; i < member.Elements.Length; i++) 2219AddUniqueAccessor(elements, member.Elements[i]);
System\Xml\Serialization\XmlSchemaExporter.cs (14)
45if (mapping.Members!.Length == 1 && mapping.Members[0].Elements![0].Mapping is SpecialMapping) 47SpecialMapping special = (SpecialMapping)mapping.Members[0].Elements![0].Mapping!; 82else if (member.Elements == null || member.Elements.Length == 0) 85if (member.TypeDesc!.IsArrayLike && !(member.Elements[0].Mapping is ArrayMapping)) 86throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayElement, member.Elements[0].Name)); 90ExportElement(member.Elements[0]); 94ExportMapping(member.Elements[0].Mapping!, member.Elements[0].Namespace, member.Elements[0].Any); 1055if (member.Elements!.Length > 0) 1058!(member.Elements.Length == 1 && member.Elements[0].Mapping is ArrayMapping); 1061ExportElementAccessors(seq, member.Elements, repeats, valueTypeOptional, ns);
System\Xml\Serialization\XmlSchemaImporter.cs (9)
777Array.Sort(member.Elements, new ElementComparer()); 779AddScopeElements(elementsScope, member.Elements, ref needExplicitOrder, allowDuplicates); 782Hashtable uniqueTypeDescs = new Hashtable(member.Elements.Length); 784for (int i = 0; i < member.Elements.Length; i++) 786ElementAccessor element = member.Elements[i]; 845member.ChoiceIdentifier.Mapping = ImportEnumeratedChoice(member.Elements, ns, $"{member.Name}ChoiceType"); 846member.ChoiceIdentifier.MemberIds = new string[member.Elements.Length]; 848for (int i = 0; i < member.Elements.Length; i++) 1295arrayMapping.Elements = choiceMember.Elements;
System\Xml\Serialization\XmlSerializationReader.cs (17)
2543for (int j = 0; j < mapping.Elements!.Length; j++) 2545if (mapping.Elements[j].Any && mapping.Elements[j].Name.Length == 0) 2557else if (mapping.TypeDesc!.IsArrayLike && !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) 3331for (int j = 0; j < mapping.Elements!.Length; j++) 3333if (mapping.Elements[j].Any && string.IsNullOrEmpty(mapping.Elements[j].Name)) 3346if (mapping.Attribute == null && mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping) 3360if (mapping.TypeDesc.IsArrayLike && !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) 3868if (member.Mapping.Elements!.Length == 0) 3871TypeMapping? mapping = member.Mapping.Elements[0].Mapping; 3987ElementAccessor[] elements = member.Mapping.Elements!; 4155ElementAccessor[] elements = anyElement.Mapping.Elements!; 4206ElementAccessor[] elements = member.Mapping.Elements!;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (15)
470for (int j = 0; j < mapping.Elements!.Length; j++) 472if (mapping.Elements[j].Any && mapping.Elements[j].Name.Length == 0) 484else if (mapping.TypeDesc!.IsArrayLike && !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) 1555for (int j = 0; j < mapping.Elements!.Length; j++) 1557if (mapping.Elements[j].Any && string.IsNullOrEmpty(mapping.Elements[j].Name)) 1570if (mapping.Attribute == null && mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping) 1584if (mapping.TypeDesc.IsArrayLike && !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) 2210ElementAccessor[] elements = member.Mapping.Elements!; 2423ElementAccessor[] elements = anyElement.Mapping.Elements!; 2469ElementAccessor[] elements = member.Mapping.Elements!;
System\Xml\Serialization\XmlSerializationWriter.cs (3)
2763if (isRpc && member.IsReturnValue && member.Elements!.Length > 0) 2766WriteQuotedCSharpString(member.Elements[0].Name); 3229bool checkShouldPersist = m.CheckShouldPersist && (m.Elements!.Length > 0 || m.Text != null);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
1105bool checkShouldPersist = m.CheckShouldPersist && (m.Elements!.Length > 0 || m.Text != null);