19 writes to IsNullable
System.Private.Xml (19)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1254element.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)
287element.IsNullable = root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 291element.IsNullable = model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 1399member.Elements[0].IsNullable = false; 1523arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 1667element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1715element.IsNullable = false; 1753arrayElement.IsNullable = a.XmlArray.IsNullable; 1840element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1908element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1958element.IsNullable = false;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
106accessor.IsNullable = typeMapping.TypeDesc!.IsNullable; 242accessor.IsNullable = false; 312accessor.IsNullable = element.IsNillable; 1253arrayAccessor.IsNullable = element.IsNillable;
System\Xml\Serialization\XmlSerializationReader.cs (1)
3223element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1306element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable;
65 references to IsNullable
System.Private.Xml (65)
System\Xml\Serialization\Mappings.cs (2)
829if (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)
857if (element.IsNullable && ReadNull()) 953isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable,
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (13)
86if (element.IsNullable) 235if (o != null || (!isNullable || element.IsNullable)) 404else if (element.IsNullable) 412if (element.IsNullable && o == null) 425WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.IsNullable); 429WritePotentiallyReferencingElement(name, ns, o, null, false, element.IsNullable); 470WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.IsNullable, mapping.IsSoap, mapping); 472else if (o == null && element.IsNullable) 487WritePrimitive(element.IsNullable 498WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.IsNullable); 502WriteStructMethod(mapping, name, ns, o, element.IsNullable, needType: false); 509WriteSerializable((IXmlSerializable)o!, name, ns, element.IsNullable, !element.Any); 516WriteElementLiteral(node, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
288CheckNullable(element.IsNullable, model.TypeDesc, element.Mapping!); 1526CheckNullable(arrayItemElement.IsNullable, targetTypeDesc, arrayItemElement.Mapping); 1670CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1718CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1756CheckNullable(arrayElement.IsNullable, accessor.TypeDesc, arrayElement.Mapping); 1843CheckNullable(element.IsNullable, accessor.TypeDesc, element.Mapping); 1910CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1960CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping);
System\Xml\Serialization\XmlSchemaExporter.cs (3)
241element.IsNillable = accessor.IsNullable; 811int minOccurs = repeats || accessor.HasDefault || (!accessor.IsNullable && !accessor.Mapping!.TypeDesc!.IsValueType) || valueTypeOptional ? 0 : 1; 817element.IsNillable = accessor.IsNullable;
System\Xml\Serialization\XmlSchemaImporter.cs (3)
793if (!nullableMismatch && existingElement.IsNullable != element.IsNullable) 897if (item.IsNullable != item.Mapping.TypeDesc.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (3)
4654WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, fixupIndex); 4671if (element.IsNullable) 4831WriteBooleanValue(element.IsNullable);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
2971WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, elementIndex); 2996if (element.IsNullable) 3156ilg.Load(element.IsNullable);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
2874if (element.IsNullable) 3744if (isNullable && !element.IsNullable) 3817if (isNullable && !element.IsNullable) 3976if (element.IsNullable) 4005WriteValue(element.IsNullable); 4017if (element.IsNullable) 4075if (element.IsNullable) 4117WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 4123WriteQualifiedNameElement(name, ns, element.Default, source, element.IsNullable, primitiveMapping.IsSoap, primitiveMapping); 4128WritePrimitive(element.IsNullable ? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw), 4129name, ns, element.Default, source, primitiveMapping, primitiveMapping.IsSoap, true, element.IsNullable); 4152WriteValue(element.IsNullable); 4177WriteValue(element.IsNullable); 4187WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 4202WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
565if (element.IsNullable) 1616if (isNullable && !element.IsNullable) 1693if (isNullable && !element.IsNullable) 1923if (element.IsNullable) 1941if (element.IsNullable) 1957if (element.IsNullable) 1973WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 1979WriteQualifiedNameElement(name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, element.IsNullable, primitiveMapping); 1984WritePrimitive(element.IsNullable ? ("WriteNullableStringLiteral" + suffixRaw) : ("WriteElementString" + suffixRaw), 1985name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, primitiveMapping, false, true, element.IsNullable); 2006ilg.Ldc(element.IsNullable); 2022WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 2041WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);