19 writes to IsNullable
System.Private.Xml (19)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1244element.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; 1394member.Elements[0].IsNullable = false; 1518arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 1662element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1710element.IsNullable = false; 1748arrayElement.IsNullable = a.XmlArray.IsNullable; 1835element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1903element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1953element.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)
3197element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1307element.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)
857if (element.IsNullable && ReadNull()) 943isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable,
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (12)
85if (element.IsNullable) 329else if (element.IsNullable) 337if (element.IsNullable && o == null) 350WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.IsNullable); 354WritePotentiallyReferencingElement(name, ns, o, null, false, element.IsNullable); 395WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.IsNullable, mapping.IsSoap, mapping); 397else if (o == null && element.IsNullable) 412WritePrimitive(element.IsNullable 423WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.IsNullable); 427WriteStructMethod(mapping, name, ns, o, element.IsNullable, needType: false); 434WriteSerializable((IXmlSerializable)o!, name, ns, element.IsNullable, !element.Any); 441WriteElementLiteral(node, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
288CheckNullable(element.IsNullable, model.TypeDesc, element.Mapping!); 1521CheckNullable(arrayItemElement.IsNullable, targetTypeDesc, arrayItemElement.Mapping); 1665CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1713CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1751CheckNullable(arrayElement.IsNullable, accessor.TypeDesc, arrayElement.Mapping); 1838CheckNullable(element.IsNullable, accessor.TypeDesc, element.Mapping); 1905CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1955CheckNullable(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)
793if (!nullableMismatch && existingElement.IsNullable != element.IsNullable) 897if (item.IsNullable != item.Mapping.TypeDesc.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (3)
4628WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, fixupIndex); 4645if (element.IsNullable) 4796WriteBooleanValue(element.IsNullable);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
2972WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, elementIndex); 2997if (element.IsNullable) 3156ilg.Load(element.IsNullable);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
2827if (element.IsNullable) 3697if (isNullable && !element.IsNullable) 3770if (isNullable && !element.IsNullable) 3929if (element.IsNullable) 3958WriteValue(element.IsNullable); 3970if (element.IsNullable) 4028if (element.IsNullable) 4070WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 4076WriteQualifiedNameElement(name, ns, element.Default, source, element.IsNullable, primitiveMapping.IsSoap, primitiveMapping); 4081WritePrimitive(element.IsNullable ? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw), 4082name, ns, element.Default, source, primitiveMapping, primitiveMapping.IsSoap, true, element.IsNullable); 4105WriteValue(element.IsNullable); 4130WriteValue(element.IsNullable); 4140WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 4155WriteElementCall("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);