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