58 references to IsNullable
System.Private.Xml (58)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (5)
815
WriteElement(e, isList && member.Mapping.TypeDesc.
IsNullable
, member.Mapping.ReadOnly, ns, member.FixupIndex, fixup, member);
943
isNullable: mapping.TypeDesc!.
IsNullable
&& element.IsNullable,
1025
object? WriteStruct() => WriteStructMethod(structMapping, mapping.TypeDesc!.
IsNullable
, true, defaultNamespace: null);
1244
element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.
IsNullable
;
1557
if (structMapping.TypeDesc!.
IsNullable
&& isNull)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
52
CreateXmlSerializationWriteCallback(mapping, mapping.TypeName!, mapping.Namespace, mapping.TypeDesc.
IsNullable
)
125
WriteElements(o, elements, text, choice, writeAccessors, memberTypeDesc.
IsNullable
);
136
if (arrayTypeDesc.
IsNullable
&& o == null)
System\Xml\Serialization\XmlReflectionImporter.cs (4)
287
element.IsNullable = root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.
IsNullable
|| model.TypeDesc.IsOptionalValue;
291
element.IsNullable = model.TypeDesc.
IsNullable
|| model.TypeDesc.IsOptionalValue;
1518
arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.
IsNullable
|| targetTypeDesc.IsOptionalValue;
2233
if (isNullable && !typeDesc.
IsNullable
) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
System\Xml\Serialization\XmlSchemaImporter.cs (3)
106
accessor.IsNullable = typeMapping.TypeDesc!.
IsNullable
;
897
if (item.IsNullable != item.Mapping.TypeDesc.
IsNullable
)
1252
if (arrayMapping.TypeDesc!.
IsNullable
)
System\Xml\Serialization\XmlSerializationReader.cs (9)
3078
if (derived.TypeDesc.
IsNullable
)
3197
element.IsNullable = nullableMapping.BaseMapping.TypeDesc.
IsNullable
;
3224
if (structMapping.TypeDesc.
IsNullable
)
3232
if (structMapping.TypeDesc.
IsNullable
)
3283
if (structMapping.TypeDesc.
IsNullable
)
3321
member.IsNullable = mapping.TypeDesc!.
IsNullable
;
3944
if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.TypeDesc.
IsNullable
)
4314
WriteElement(member.ArraySource, member.ArrayName, member.ChoiceArraySource, e, choice, member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? member.CheckSpecifiedSource : null, member.IsList && member.Mapping.TypeDesc!.
IsNullable
, member.Mapping.ReadOnly, member.FixupIndex, j);
4794
if (mapping.TypeDesc!.
IsNullable
)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (8)
1147
if (derived.TypeDesc!.
IsNullable
)
1307
element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.
IsNullable
;
1332
if (structMapping.TypeDesc.
IsNullable
)
1371
if (structMapping.TypeDesc.
IsNullable
)
1484
if (structMapping.TypeDesc.
IsNullable
)
1545
member.IsNullable = mapping.TypeDesc!.
IsNullable
;
2533
WriteElement(member.ArraySource, member.ArrayName, member.ChoiceArraySource, e, choice, member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? member.CheckSpecifiedSource : null, member.IsList && member.Mapping.TypeDesc!.
IsNullable
, member.Mapping.ReadOnly, member.FixupIndex, j);
3154
if (mapping.TypeDesc!.
IsNullable
)
System\Xml\Serialization\XmlSerializationWriter.cs (13)
2994
if (derived.TypeDesc.
IsNullable
)
3098
if (mapping.TypeDesc.
IsNullable
)
3102
if (mapping.TypeDesc.
IsNullable
)
3297
if (memberTypeDesc.
IsNullable
)
3445
if (memberTypeDesc.
IsNullable
)
3490
WriteElements(source, choiceSource, elements, text, choice, "a", writeAccessors, memberTypeDesc.
IsNullable
);
3501
if (arrayTypeDesc.
IsNullable
)
3524
if (arrayTypeDesc.
IsNullable
)
3624
WriteElements($"{arrayName}i", $"{choiceName}i", elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.
IsNullable
);
3628
WriteElements(RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.
IsNullable
);
3976
if (arrayMapping.TypeDesc.
IsNullable
)
4034
if (arrayMapping.TypeDesc.
IsNullable
)
4127
if (structMapping.TypeDesc!.
IsNullable
)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
762
if (derived.TypeDesc.
IsNullable
)
923
if (mapping.TypeDesc.
IsNullable
)
935
if (mapping.TypeDesc.
IsNullable
)
1163
if (memberTypeDesc.
IsNullable
)
1343
if (memberTypeDesc.
IsNullable
)
1411
WriteElements(source, choiceSource, elements, text, choice, $"a{memberTypeDesc.Name}", writeAccessors, memberTypeDesc.
IsNullable
);
1422
if (arrayTypeDesc.
IsNullable
)
1467
if (arrayTypeDesc.
IsNullable
)
1554
WriteElements(new SourceInfo(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), $"{choiceName}i", elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.
IsNullable
);
1558
WriteElements(new SourceInfo(ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.
IsNullable
);
1947
if (arrayMapping.TypeDesc.
IsNullable
)
1963
if (arrayMapping.TypeDesc.
IsNullable
)
2004
if (structMapping.TypeDesc.
IsNullable
)