19 writes to IsNullable
System.Private.Xml (19)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1244
element.
IsNullable
= nullableMapping.BaseMapping!.TypeDesc!.IsNullable;
System\Xml\Serialization\SoapReflectionImporter.cs (2)
661
member.Elements![0].
IsNullable
= false;
723
element.
IsNullable
= a.SoapElement.IsNullable;
System\Xml\Serialization\XmlReflectionImporter.cs (10)
287
element.
IsNullable
= root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue;
291
element.
IsNullable
= model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue;
1394
member.Elements[0].
IsNullable
= false;
1518
arrayItemElement.
IsNullable
= xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue;
1662
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1710
element.
IsNullable
= false;
1748
arrayElement.
IsNullable
= a.XmlArray.IsNullable;
1835
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1903
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1953
element.
IsNullable
= false;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
106
accessor.
IsNullable
= typeMapping.TypeDesc!.IsNullable;
242
accessor.
IsNullable
= false;
312
accessor.
IsNullable
= element.IsNillable;
1253
arrayAccessor.
IsNullable
= element.IsNillable;
System\Xml\Serialization\XmlSerializationReader.cs (1)
3197
element.
IsNullable
= nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1307
element.
IsNullable
= nullableMapping.BaseMapping!.TypeDesc!.IsNullable;
64 references to IsNullable
System.Private.Xml (64)
System\Xml\Serialization\Mappings.cs (2)
830
if (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)
857
if (element.
IsNullable
&& ReadNull())
943
isNullable: mapping.TypeDesc!.IsNullable && element.
IsNullable
,
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (12)
85
if (element.
IsNullable
)
329
else if (element.
IsNullable
)
337
if (element.
IsNullable
&& o == null)
350
WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.
IsNullable
);
354
WritePotentiallyReferencingElement(name, ns, o, null, false, element.
IsNullable
);
395
WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.
IsNullable
, mapping.IsSoap, mapping);
397
else if (o == null && element.
IsNullable
)
412
WritePrimitive(element.
IsNullable
423
WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.
IsNullable
);
427
WriteStructMethod(mapping, name, ns, o, element.
IsNullable
, needType: false);
434
WriteSerializable((IXmlSerializable)o!, name, ns, element.
IsNullable
, !element.Any);
441
WriteElementLiteral(node, name, ns, element.
IsNullable
, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
288
CheckNullable(element.
IsNullable
, model.TypeDesc, element.Mapping!);
1521
CheckNullable(arrayItemElement.
IsNullable
, targetTypeDesc, arrayItemElement.Mapping);
1665
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1713
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1751
CheckNullable(arrayElement.
IsNullable
, accessor.TypeDesc, arrayElement.Mapping);
1838
CheckNullable(element.
IsNullable
, accessor.TypeDesc, element.Mapping);
1905
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1955
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
System\Xml\Serialization\XmlSchemaExporter.cs (3)
241
element.IsNillable = accessor.
IsNullable
;
815
int minOccurs = repeats || accessor.HasDefault || (!accessor.
IsNullable
&& !accessor.Mapping!.TypeDesc!.IsValueType) || valueTypeOptional ? 0 : 1;
821
element.IsNillable = accessor.
IsNullable
;
System\Xml\Serialization\XmlSchemaImporter.cs (3)
793
if (!nullableMismatch && existingElement.
IsNullable
!= element.
IsNullable
)
897
if (item.
IsNullable
!= item.Mapping.TypeDesc.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (3)
4628
WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.
IsNullable
, fixupIndex);
4645
if (element.
IsNullable
)
4796
WriteBooleanValue(element.
IsNullable
);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
2972
WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.
IsNullable
, elementIndex);
2997
if (element.
IsNullable
)
3156
ilg.Load(element.
IsNullable
);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
2827
if (element.
IsNullable
)
3697
if (isNullable && !element.
IsNullable
)
3770
if (isNullable && !element.
IsNullable
)
3929
if (element.
IsNullable
)
3958
WriteValue(element.
IsNullable
);
3970
if (element.
IsNullable
)
4028
if (element.
IsNullable
)
4070
WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.
IsNullable
);
4076
WriteQualifiedNameElement(name, ns, element.Default, source, element.
IsNullable
, primitiveMapping.IsSoap, primitiveMapping);
4081
WritePrimitive(element.
IsNullable
? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw),
4082
name, ns, element.Default, source, primitiveMapping, primitiveMapping.IsSoap, true, element.
IsNullable
);
4105
WriteValue(element.
IsNullable
);
4130
WriteValue(element.
IsNullable
);
4140
WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.
IsNullable
, !element.Any);
4155
WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.
IsNullable
, element.Any);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
565
if (element.
IsNullable
)
1616
if (isNullable && !element.
IsNullable
)
1693
if (isNullable && !element.
IsNullable
)
1923
if (element.
IsNullable
)
1941
if (element.
IsNullable
)
1957
if (element.
IsNullable
)
1973
WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.
IsNullable
);
1979
WriteQualifiedNameElement(name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, element.
IsNullable
, primitiveMapping);
1984
WritePrimitive(element.
IsNullable
? ("WriteNullableStringLiteral" + suffixRaw) : ("WriteElementString" + suffixRaw),
1985
name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, primitiveMapping, false, true, element.
IsNullable
);
2006
ilg.Ldc(element.
IsNullable
);
2022
WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.
IsNullable
, !element.Any);
2041
WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.
IsNullable
, element.Any);