19 writes to IsNullable
System.Private.Xml (19)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1259
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)
274
element.
IsNullable
= root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue;
278
element.
IsNullable
= model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue;
1373
member.Elements[0].
IsNullable
= false;
1495
arrayItemElement.
IsNullable
= xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue;
1638
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1686
element.
IsNullable
= false;
1724
arrayElement.
IsNullable
= a.XmlArray.IsNullable;
1811
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1879
element.
IsNullable
= xmlElement.GetIsNullableSpecified() ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue;
1929
element.
IsNullable
= false;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
99
accessor.
IsNullable
= typeMapping.TypeDesc!.IsNullable;
229
accessor.
IsNullable
= false;
297
accessor.
IsNullable
= element.IsNillable;
1221
arrayAccessor.
IsNullable
= element.IsNillable;
System\Xml\Serialization\XmlSerializationReader.cs (1)
3186
element.
IsNullable
= nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1320
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)
864
if (element.
IsNullable
&& ReadNull())
950
isNullable: mapping.TypeDesc!.IsNullable && element.
IsNullable
,
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (12)
87
if (element.
IsNullable
)
336
else if (element.
IsNullable
)
344
if (element.
IsNullable
&& o == null)
357
WritePotentiallyReferencingElement(name, ns, o, mapping.TypeDesc!.Type, true, element.
IsNullable
);
361
WritePotentiallyReferencingElement(name, ns, o, null, false, element.
IsNullable
);
402
WriteQualifiedNameElement(name, ns!, element.Default, (XmlQualifiedName)o!, element.
IsNullable
, mapping.IsSoap, mapping);
404
else if (o == null && element.
IsNullable
)
419
WritePrimitive(element.
IsNullable
430
WritePotentiallyReferencingElement(name, ns, o, !writeAccessor ? mapping.TypeDesc!.Type : null, !writeAccessor, element.
IsNullable
);
434
WriteStructMethod(mapping, name, ns, o, element.
IsNullable
, needType: false);
441
WriteSerializable((IXmlSerializable)o!, name, ns, element.
IsNullable
, !element.Any);
448
WriteElementLiteral(node, name, ns, element.
IsNullable
, element.Any);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
275
CheckNullable(element.
IsNullable
, model.TypeDesc, element.Mapping!);
1498
CheckNullable(arrayItemElement.
IsNullable
, targetTypeDesc, arrayItemElement.Mapping);
1641
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1689
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1727
CheckNullable(arrayElement.
IsNullable
, accessor.TypeDesc, arrayElement.Mapping);
1814
CheckNullable(element.
IsNullable
, accessor.TypeDesc, element.Mapping);
1881
CheckNullable(element.
IsNullable
, targetTypeDesc, element.Mapping);
1931
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)
768
if (!nullableMismatch && existingElement.
IsNullable
!= element.
IsNullable
)
872
if (item.
IsNullable
!= item.Mapping.TypeDesc.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (3)
4617
WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.
IsNullable
, fixupIndex);
4634
if (element.
IsNullable
)
4785
WriteBooleanValue(element.
IsNullable
);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
3004
WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.
IsNullable
, elementIndex);
3029
if (element.
IsNullable
)
3188
ilg.Load(element.
IsNullable
);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
2825
if (element.
IsNullable
)
3695
if (isNullable && !element.
IsNullable
)
3768
if (isNullable && !element.
IsNullable
)
3927
if (element.
IsNullable
)
3956
WriteValue(element.
IsNullable
);
3968
if (element.
IsNullable
)
4026
if (element.
IsNullable
)
4068
WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.
IsNullable
);
4074
WriteQualifiedNameElement(name, ns, element.Default, source, element.
IsNullable
, primitiveMapping.IsSoap, primitiveMapping);
4079
WritePrimitive(element.
IsNullable
? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw),
4080
name, ns, element.Default, source, primitiveMapping, primitiveMapping.IsSoap, true, element.
IsNullable
);
4103
WriteValue(element.
IsNullable
);
4128
WriteValue(element.
IsNullable
);
4138
WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.
IsNullable
, !element.Any);
4153
WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.
IsNullable
, element.Any);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
579
if (element.
IsNullable
)
1638
if (isNullable && !element.
IsNullable
)
1715
if (isNullable && !element.
IsNullable
)
1947
if (element.
IsNullable
)
1965
if (element.
IsNullable
)
1981
if (element.
IsNullable
)
1997
WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.
IsNullable
);
2003
WriteQualifiedNameElement(name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, element.
IsNullable
, primitiveMapping);
2008
WritePrimitive(element.
IsNullable
? ("WriteNullableStringLiteral" + suffixRaw) : ("WriteElementString" + suffixRaw),
2009
name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, primitiveMapping, false, true, element.
IsNullable
);
2030
ilg.Ldc(element.
IsNullable
);
2046
WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.
IsNullable
, !element.Any);
2065
WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.
IsNullable
, element.Any);