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