19 writes to IsNullable
System.Private.Xml (19)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1351element.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; 1400member.Elements[0].IsNullable = false; 1524arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 1682element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1730element.IsNullable = false; 1768arrayElement.IsNullable = a.XmlArray.IsNullable; 1855element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1923element.IsNullable = xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1973element.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)
3261element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1383element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable;
67 references to IsNullable
System.Private.Xml (67)
System\Xml\Serialization\Mappings.cs (2)
844if (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)
914if (element.IsNullable && ReadNull()) 1015isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable,
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (14)
87if (element.IsNullable) 293WritePrimitiveMethodRequirement method = element.IsNullable 393if (o != null || (!isNullable || element.IsNullable)) 562else if (element.IsNullable) 570if (element.IsNullable && o == null) 583WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.IsNullable); 587WritePotentiallyReferencingElement(name, ns, o, null, false, element.IsNullable); 628WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.IsNullable, mapping.IsSoap, mapping); 630else if (o == null && element.IsNullable) 645WritePrimitive(element.IsNullable 656WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.IsNullable); 660WriteStructMethod(mapping, name, ns, o, element.IsNullable, needType: false); 667WriteSerializable((IXmlSerializable)o!, name, ns, element.IsNullable, !element.Any); 674WriteElementLiteral(node, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
288CheckNullable(element.IsNullable, model.TypeDesc, element.Mapping!); 1527CheckNullable(arrayItemElement.IsNullable, targetTypeDesc, arrayItemElement.Mapping); 1685CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1733CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1771CheckNullable(arrayElement.IsNullable, accessor.TypeDesc, arrayElement.Mapping); 1858CheckNullable(element.IsNullable, accessor.TypeDesc, element.Mapping); 1925CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1975CheckNullable(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 (4)
4747WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, fixupIndex); 4764if (element.IsNullable) 4866if (element.IsNullable) 4935WriteBooleanValue(element.IsNullable);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
3178WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, elementIndex); 3203if (element.IsNullable) 3367ilg.Load(element.IsNullable);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
2874if (element.IsNullable) 3762if (isNullable && !element.IsNullable) 3835if (isNullable && !element.IsNullable) 3994if (element.IsNullable) 4023WriteValue(element.IsNullable); 4035if (element.IsNullable) 4093if (element.IsNullable) 4135WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 4141WriteQualifiedNameElement(name, ns, element.Default, source, element.IsNullable, primitiveMapping.IsSoap, primitiveMapping); 4146WritePrimitive(element.IsNullable ? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw), 4147name, ns, element.Default, source, primitiveMapping, primitiveMapping.IsSoap, true, element.IsNullable); 4170WriteValue(element.IsNullable); 4195WriteValue(element.IsNullable); 4205WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 4220WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
565if (element.IsNullable) 1659if (isNullable && !element.IsNullable) 1736if (isNullable && !element.IsNullable) 1966if (element.IsNullable) 1984if (element.IsNullable) 2000if (element.IsNullable) 2016WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 2022WriteQualifiedNameElement(name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, element.IsNullable, primitiveMapping); 2027WritePrimitive(element.IsNullable ? ("WriteNullableStringLiteral" + suffixRaw) : ("WriteElementString" + suffixRaw), 2028name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, primitiveMapping, false, true, element.IsNullable); 2049ilg.Ldc(element.IsNullable); 2065WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 2084WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);