2 writes to Members
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\ClassDataContract.cs (1)
1373boundClassContract.Members = new List<DataMember>(Members.Count);
System\Runtime\Serialization\SchemaImporter.cs (1)
680dataContract.Members = new List<DataMember>();
81 references to Members
System.Private.DataContractSerialization (81)
System\Runtime\Serialization\ClassDataContract.cs (36)
76public override ReadOnlyCollection<DataMember> DataMembers => (Members == null) ? ReadOnlyCollection<DataMember>.Empty : Members.AsReadOnly(); 356if (Members == null) 363XmlDictionaryString?[] childElementNamespaces = new XmlDictionaryString?[Members.Count + baseChildElementNamespaceCount]; 368for (int i = 0; i < Members.Count; i++) 370childElementNamespaces[i + baseChildElementNamespaceCount] = GetChildNamespaceToDeclare(this, Members[i].MemberType, dictionary); 471if (Members != null) 473for (int i = 0; i < Members.Count; i++) 475if (Members[i].RequiresMemberAccessForSet()) 479if (Members[i].MemberInfo is FieldInfo) 484Members[i].MemberInfo.Name), 492Members[i].MemberInfo.Name), 554if (Members != null) 556for (int i = 0; i < Members.Count; i++) 558if (Members[i].RequiresMemberAccessForGet()) 562if (Members[i].MemberInfo is FieldInfo) 567Members[i].MemberInfo.Name), 575Members[i].MemberInfo.Name), 989foreach (DataMember member in currContract.Members!) 1371if (Members != null) 1373boundClassContract.Members = new List<DataMember>(Members.Count); 1374foreach (DataMember member in Members) 1375boundClassContract.Members.Add(member.BindGenericParameters(paramContracts, boundContracts)); 1404if (Members == null) 1406if (dataContract.Members != null) 1409if (!IsEveryDataMemberOptional(dataContract.Members)) 1413else if (dataContract.Members == null) 1416if (!IsEveryDataMemberOptional(Members)) 1421Dictionary<string, DataMember> membersDictionary = new Dictionary<string, DataMember>(Members.Count); 1423for (int i = 0; i < Members.Count; i++) 1425membersDictionary.Add(Members[i].Name, Members[i]); 1428for (int i = 0; i < dataContract.Members.Count; i++) 1431if (membersDictionary.TryGetValue(dataContract.Members[i].Name, out DataMember? dataMember)) 1433if (dataMember.Equals(dataContract.Members[i], checkedContracts)) 1445dataContractMembersList.Add(dataContract.Members[i]);
System\Runtime\Serialization\DataContractSet.cs (3)
149if (classDataContract.Members != null) 151for (int i = 0; i < classDataContract.Members.Count; i++) 153DataMember dataMember = classDataContract.Members[i];
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (6)
364for (int i = 0; i < classContract.Members!.Count; i++, memberCount++) 366DataMember dataMember = classContract.Members[i]; 426List<DataMember> members = contract.Members!; 741DataContract keyDataContract = keyValueDataContract.Members![0].MemberTypeContract; 995DataMember keyMember = keyValuePairContract.Members![0]; 996DataMember valueMember = keyValuePairContract.Members[1];
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (2)
237int classMemberCount = classContract.Members!.Count; 242DataMember member = classContract.Members[i];
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (1)
161DataContract keyDataContract = keyValueDataContract.Members![0].MemberTypeContract;
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (3)
211context.IncrementItemCount(classContract.Members!.Count); 212for (int i = 0; i < classContract.Members.Count; i++, memberCount++) 214DataMember member = classContract.Members[i];
System\Runtime\Serialization\ReflectionReader.cs (2)
215for (int i = 0; i < classContract.Members!.Count; i++, memberCount++) 217members[childElementIndex + i] = classContract.Members[i];
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (1)
145List<DataMember> members = contract.Members!;
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (4)
146context.IncrementItemCount(classContract.Members!.Count); 147for (int i = 0; i < classContract.Members.Count; i++, memberCount++) 149DataMember member = classContract.Members[i]; 244List<DataMember> members = currentContract.Members!;
System\Runtime\Serialization\SchemaExporter.cs (3)
129for (int i = 0; i < classDataContract.Members!.Count; i++) 131DataMember dataMember = classDataContract.Members[i]; 384foreach (DataMember dataMember in keyValueContract.Members!)
System\Runtime\Serialization\SchemaImporter.cs (10)
997Debug.Assert(dataContract.Members != null); // This method is only called from ImportClass() after that method has initialized the Members collection. 1000int prevMemberIndex = dataContract.Members.Count - 1; 1003DataMember prevMember = dataContract.Members![prevMemberIndex]; 1005memberOrder = dataContract.Members.Count; 1011memberOrder = dataContract.Members.Count; 1018dataContract.Members.Add(dataMember); 1106if (keyValueContract == null || keyValueContract.Members == null || keyValueContract.Members.Count != 2 1107|| !(key = keyValueContract.Members[0]).IsRequired || !(value = keyValueContract.Members[1]).IsRequired)
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (5)
423for (int i = 0; i < classContract.Members!.Count; i++, memberCount++) 425DataMember dataMember = classContract.Members[i]; 479List<DataMember> members = contract.Members!; 924DataMember keyMember = keyValuePairContract.Members![0]; 925DataMember valueMember = keyValuePairContract.Members[1];
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (3)
307int classMemberCount = classContract.Members!.Count; 312DataMember member = classContract.Members[i]; 804List<DataMember> members = currentContract.Members!;
System\Runtime\Serialization\XPathQueryGenerator.cs (2)
95if (contract.Members != null) 97foreach (DataMember member in contract.Members)