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;
1398
member.Elements[0].
IsNullable
= false;
1522
arrayItemElement.
IsNullable
= xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue;
1666
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1714
element.
IsNullable
= false;
1752
arrayElement.
IsNullable
= a.XmlArray.IsNullable;
1839
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1907
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1957
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;
65 references to IsNullable
System.Private.Xml (65)
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 (13)
86
if (element.
IsNullable
)
235
if (o != null || (!isNullable || element.
IsNullable
))
404
else if (element.
IsNullable
)
412
if (element.
IsNullable
&& o == null)
425
WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.
IsNullable
);
429
WritePotentiallyReferencingElement(name, ns, o, null, false, element.
IsNullable
);
470
WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.
IsNullable
, mapping.IsSoap, mapping);
472
else if (o == null && element.
IsNullable
)
487
WritePrimitive(element.
IsNullable
498
WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.
IsNullable
);
502
WriteStructMethod(mapping, name, ns, o, element.
IsNullable
, needType: false);
509
WriteSerializable((IXmlSerializable)o!, name, ns, element.
IsNullable
, !element.Any);
516
WriteElementLiteral(node, name, ns, element.
IsNullable
, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
288
CheckNullable(element.
IsNullable
, model.TypeDesc, element.Mapping!);
1525
CheckNullable(arrayItemElement.
IsNullable
, targetTypeDesc, arrayItemElement.Mapping);
1669
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1717
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1755
CheckNullable(arrayElement.
IsNullable
, accessor.TypeDesc, arrayElement.Mapping);
1842
CheckNullable(element.
IsNullable
, accessor.TypeDesc, element.Mapping);
1909
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1959
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);