58 references to IsNullable
System.Private.Xml (58)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (5)
872
WriteElement(e, isList && member.Mapping.TypeDesc.
IsNullable
, member.Mapping.ReadOnly, ns, member.FixupIndex, fixup, member, elementIndex);
1011
isNullable: mapping.TypeDesc!.
IsNullable
&& element.IsNullable,
1129
object? WriteStruct() => WriteStructMethod(structMapping, mapping.TypeDesc!.
IsNullable
, true, defaultNamespace: null);
1346
element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.
IsNullable
;
1659
if (structMapping.TypeDesc!.
IsNullable
&& isNull)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
53
CreateXmlSerializationWriteCallback(mapping, mapping.TypeName!, mapping.Namespace, mapping.TypeDesc.
IsNullable
)
126
WriteElements(o, choiceSource, elements, text, choice, writeAccessors, memberTypeDesc.
IsNullable
);
137
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;
1524
arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.
IsNullable
|| targetTypeDesc.IsOptionalValue;
2283
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)
3139
if (derived.TypeDesc.
IsNullable
)
3258
element.IsNullable = nullableMapping.BaseMapping.TypeDesc.
IsNullable
;
3285
if (structMapping.TypeDesc.
IsNullable
)
3293
if (structMapping.TypeDesc.
IsNullable
)
3344
if (structMapping.TypeDesc.
IsNullable
)
3382
member.IsNullable = mapping.TypeDesc!.
IsNullable
;
4012
if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.TypeDesc.
IsNullable
)
4406
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);
4923
if (mapping.TypeDesc!.
IsNullable
)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (8)
1223
if (derived.TypeDesc!.
IsNullable
)
1383
element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.
IsNullable
;
1408
if (structMapping.TypeDesc.
IsNullable
)
1447
if (structMapping.TypeDesc.
IsNullable
)
1560
if (structMapping.TypeDesc.
IsNullable
)
1621
member.IsNullable = mapping.TypeDesc!.
IsNullable
;
2649
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);
3369
if (mapping.TypeDesc!.
IsNullable
)
System\Xml\Serialization\XmlSerializationWriter.cs (13)
3041
if (derived.TypeDesc.
IsNullable
)
3145
if (mapping.TypeDesc.
IsNullable
)
3149
if (mapping.TypeDesc.
IsNullable
)
3344
if (memberTypeDesc.
IsNullable
)
3492
if (memberTypeDesc.
IsNullable
)
3537
WriteElements(source, choiceSource, elements, text, choice, "a", writeAccessors, memberTypeDesc.
IsNullable
);
3548
if (arrayTypeDesc.
IsNullable
)
3571
if (arrayTypeDesc.
IsNullable
)
3685
WriteElements($"{arrayName}i", $"{choiceName}i", elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.
IsNullable
);
3693
WriteElements(RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.
IsNullable
);
4041
if (arrayMapping.TypeDesc.
IsNullable
)
4099
if (arrayMapping.TypeDesc.
IsNullable
)
4192
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
)
1575
WriteElements(new SourceInfo(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), $"{choiceName}i", elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.
IsNullable
);
1587
WriteElements(new SourceInfo(ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.
IsNullable
);
1990
if (arrayMapping.TypeDesc.
IsNullable
)
2006
if (arrayMapping.TypeDesc.
IsNullable
)
2047
if (structMapping.TypeDesc.
IsNullable
)