19 writes to IsNullable
System.Private.Xml (19)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1259element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable;
System\Xml\Serialization\SoapReflectionImporter.cs (2)
661member.Elements![0].IsNullable = false; 723element.IsNullable = a.SoapElement.IsNullable;
System\Xml\Serialization\XmlReflectionImporter.cs (10)
274element.IsNullable = root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 278element.IsNullable = model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 1373member.Elements[0].IsNullable = false; 1495arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 1638element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1686element.IsNullable = false; 1724arrayElement.IsNullable = a.XmlArray.IsNullable; 1811element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1879element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1929element.IsNullable = false;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
99accessor.IsNullable = typeMapping.TypeDesc!.IsNullable; 229accessor.IsNullable = false; 297accessor.IsNullable = element.IsNillable; 1221arrayAccessor.IsNullable = element.IsNillable;
System\Xml\Serialization\XmlSerializationReader.cs (1)
3186element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1320element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable;
64 references to IsNullable
System.Private.Xml (64)
System\Xml\Serialization\Mappings.cs (2)
830if (a[i].Name != b[i].Name || a[i].Namespace != b[i].Namespace || a[i].Form != b[i].Form || a[i].IsNullable != b[i].IsNullable)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
864if (element.IsNullable && ReadNull()) 950isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable,
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (12)
87if (element.IsNullable) 336else if (element.IsNullable) 344if (element.IsNullable && o == null) 357WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.IsNullable); 361WritePotentiallyReferencingElement(name, ns, o, null, false, element.IsNullable); 402WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.IsNullable, mapping.IsSoap, mapping); 404else if (o == null && element.IsNullable) 419WritePrimitive(element.IsNullable 430WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.IsNullable); 434WriteStructMethod(mapping, name, ns, o, element.IsNullable, needType: false); 441WriteSerializable((IXmlSerializable)o!, name, ns, element.IsNullable, !element.Any); 448WriteElementLiteral(node, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
275CheckNullable(element.IsNullable, model.TypeDesc, element.Mapping!); 1498CheckNullable(arrayItemElement.IsNullable, targetTypeDesc, arrayItemElement.Mapping); 1641CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1689CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1727CheckNullable(arrayElement.IsNullable, accessor.TypeDesc, arrayElement.Mapping); 1814CheckNullable(element.IsNullable, accessor.TypeDesc, element.Mapping); 1881CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1931CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping);
System\Xml\Serialization\XmlSchemaExporter.cs (3)
241element.IsNillable = accessor.IsNullable; 815int minOccurs = repeats || accessor.HasDefault || (!accessor.IsNullable && !accessor.Mapping!.TypeDesc!.IsValueType) || valueTypeOptional ? 0 : 1; 821element.IsNillable = accessor.IsNullable;
System\Xml\Serialization\XmlSchemaImporter.cs (3)
768if (!nullableMismatch && existingElement.IsNullable != element.IsNullable) 872if (item.IsNullable != item.Mapping.TypeDesc.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (3)
4617WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, fixupIndex); 4634if (element.IsNullable) 4785WriteBooleanValue(element.IsNullable);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
3004WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, elementIndex); 3029if (element.IsNullable) 3188ilg.Load(element.IsNullable);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
2825if (element.IsNullable) 3695if (isNullable && !element.IsNullable) 3768if (isNullable && !element.IsNullable) 3927if (element.IsNullable) 3956WriteValue(element.IsNullable); 3968if (element.IsNullable) 4026if (element.IsNullable) 4068WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 4074WriteQualifiedNameElement(name, ns, element.Default, source, element.IsNullable, primitiveMapping.IsSoap, primitiveMapping); 4079WritePrimitive(element.IsNullable ? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw), 4080name, ns, element.Default, source, primitiveMapping, primitiveMapping.IsSoap, true, element.IsNullable); 4103WriteValue(element.IsNullable); 4128WriteValue(element.IsNullable); 4138WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 4153WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
579if (element.IsNullable) 1638if (isNullable && !element.IsNullable) 1715if (isNullable && !element.IsNullable) 1947if (element.IsNullable) 1965if (element.IsNullable) 1981if (element.IsNullable) 1997WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 2003WriteQualifiedNameElement(name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, element.IsNullable, primitiveMapping); 2008WritePrimitive(element.IsNullable ? ("WriteNullableStringLiteral" + suffixRaw) : ("WriteElementString" + suffixRaw), 2009name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, primitiveMapping, false, true, element.IsNullable); 2030ilg.Ldc(element.IsNullable); 2046WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 2065WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);