58 references to IsNullable
System.Private.Xml (58)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (5)
872WriteElement(e, isList && member.Mapping.TypeDesc.IsNullable, member.Mapping.ReadOnly, ns, member.FixupIndex, fixup, member, elementIndex); 1015isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable, 1133object? WriteStruct() => WriteStructMethod(structMapping, mapping.TypeDesc!.IsNullable, true, defaultNamespace: null); 1351element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable; 1664if (structMapping.TypeDesc!.IsNullable && isNull)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
54CreateXmlSerializationWriteCallback(mapping, mapping.TypeName!, mapping.Namespace, mapping.TypeDesc.IsNullable) 127WriteElements(o, choiceSource, elements, text, choice, writeAccessors, memberTypeDesc.IsNullable); 138if (arrayTypeDesc.IsNullable && o == null)
System\Xml\Serialization\XmlReflectionImporter.cs (4)
287element.IsNullable = root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 291element.IsNullable = model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 1524arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 2283if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
System\Xml\Serialization\XmlSchemaImporter.cs (3)
106accessor.IsNullable = typeMapping.TypeDesc!.IsNullable; 897if (item.IsNullable != item.Mapping.TypeDesc.IsNullable) 1252if (arrayMapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (9)
3142if (derived.TypeDesc.IsNullable) 3261element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable; 3288if (structMapping.TypeDesc.IsNullable) 3296if (structMapping.TypeDesc.IsNullable) 3347if (structMapping.TypeDesc.IsNullable) 3385member.IsNullable = mapping.TypeDesc!.IsNullable; 4015if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.TypeDesc.IsNullable) 4409WriteElement(member.ArraySource, member.ArrayName, member.ChoiceArraySource, e, choice, member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? member.CheckSpecifiedSource : null, member.IsList && member.Mapping.TypeDesc!.IsNullable, member.Mapping.ReadOnly, member.FixupIndex, j); 4933if (mapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (8)
1223if (derived.TypeDesc!.IsNullable) 1383element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable; 1408if (structMapping.TypeDesc.IsNullable) 1447if (structMapping.TypeDesc.IsNullable) 1560if (structMapping.TypeDesc.IsNullable) 1621member.IsNullable = mapping.TypeDesc!.IsNullable; 2649WriteElement(member.ArraySource, member.ArrayName, member.ChoiceArraySource, e, choice, member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? member.CheckSpecifiedSource : null, member.IsList && member.Mapping.TypeDesc!.IsNullable, member.Mapping.ReadOnly, member.FixupIndex, j); 3365if (mapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationWriter.cs (13)
3041if (derived.TypeDesc.IsNullable) 3145if (mapping.TypeDesc.IsNullable) 3149if (mapping.TypeDesc.IsNullable) 3344if (memberTypeDesc.IsNullable) 3492if (memberTypeDesc.IsNullable) 3537WriteElements(source, choiceSource, elements, text, choice, "a", writeAccessors, memberTypeDesc.IsNullable); 3548if (arrayTypeDesc.IsNullable) 3571if (arrayTypeDesc.IsNullable) 3685WriteElements($"{arrayName}i", $"{choiceName}i", elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.IsNullable); 3693WriteElements(RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.IsNullable); 4041if (arrayMapping.TypeDesc.IsNullable) 4099if (arrayMapping.TypeDesc.IsNullable) 4192if (structMapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
762if (derived.TypeDesc.IsNullable) 923if (mapping.TypeDesc.IsNullable) 935if (mapping.TypeDesc.IsNullable) 1163if (memberTypeDesc.IsNullable) 1343if (memberTypeDesc.IsNullable) 1411WriteElements(source, choiceSource, elements, text, choice, $"a{memberTypeDesc.Name}", writeAccessors, memberTypeDesc.IsNullable); 1422if (arrayTypeDesc.IsNullable) 1467if (arrayTypeDesc.IsNullable) 1575WriteElements(new SourceInfo(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), $"{choiceName}i", elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 1587WriteElements(new SourceInfo(ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 1990if (arrayMapping.TypeDesc.IsNullable) 2006if (arrayMapping.TypeDesc.IsNullable) 2047if (structMapping.TypeDesc.IsNullable)