58 references to IsNullable
System.Private.Xml (58)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (5)
815WriteElement(e, isList && member.Mapping.TypeDesc.IsNullable, member.Mapping.ReadOnly, ns, member.FixupIndex, fixup, member); 953isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable, 1035object? WriteStruct() => WriteStructMethod(structMapping, mapping.TypeDesc!.IsNullable, true, defaultNamespace: null); 1254element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable; 1567if (structMapping.TypeDesc!.IsNullable && isNull)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
53CreateXmlSerializationWriteCallback(mapping, mapping.TypeName!, mapping.Namespace, mapping.TypeDesc.IsNullable) 126WriteElements(o, choiceSource, elements, text, choice, writeAccessors, memberTypeDesc.IsNullable); 137if (arrayTypeDesc.IsNullable && o == null)
System\Xml\Serialization\XmlReflectionImporter.cs (4)
287element.IsNullable = root.GetIsNullableSpecified() ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 291element.IsNullable = model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 1523arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 2268if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
System\Xml\Serialization\XmlSchemaImporter.cs (3)
106accessor.IsNullable = typeMapping.TypeDesc!.IsNullable; 897if (item.IsNullable != item.Mapping.TypeDesc.IsNullable) 1252if (arrayMapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (9)
3104if (derived.TypeDesc.IsNullable) 3223element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable; 3250if (structMapping.TypeDesc.IsNullable) 3258if (structMapping.TypeDesc.IsNullable) 3309if (structMapping.TypeDesc.IsNullable) 3347member.IsNullable = mapping.TypeDesc!.IsNullable; 3970if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.TypeDesc.IsNullable) 4340WriteElement(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); 4829if (mapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (8)
1146if (derived.TypeDesc!.IsNullable) 1306element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable; 1331if (structMapping.TypeDesc.IsNullable) 1370if (structMapping.TypeDesc.IsNullable) 1483if (structMapping.TypeDesc.IsNullable) 1544member.IsNullable = mapping.TypeDesc!.IsNullable; 2532WriteElement(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); 3154if (mapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationWriter.cs (13)
3041if (derived.TypeDesc.IsNullable) 3145if (mapping.TypeDesc.IsNullable) 3149if (mapping.TypeDesc.IsNullable) 3344if (memberTypeDesc.IsNullable) 3492if (memberTypeDesc.IsNullable) 3537WriteElements(source, choiceSource, elements, text, choice, "a", writeAccessors, memberTypeDesc.IsNullable); 3548if (arrayTypeDesc.IsNullable) 3571if (arrayTypeDesc.IsNullable) 3671WriteElements($"{arrayName}i", $"{choiceName}i", elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.IsNullable); 3675WriteElements(RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.IsNullable); 4023if (arrayMapping.TypeDesc.IsNullable) 4081if (arrayMapping.TypeDesc.IsNullable) 4174if (structMapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
762if (derived.TypeDesc.IsNullable) 923if (mapping.TypeDesc.IsNullable) 935if (mapping.TypeDesc.IsNullable) 1163if (memberTypeDesc.IsNullable) 1343if (memberTypeDesc.IsNullable) 1411WriteElements(source, choiceSource, elements, text, choice, $"a{memberTypeDesc.Name}", writeAccessors, memberTypeDesc.IsNullable); 1422if (arrayTypeDesc.IsNullable) 1467if (arrayTypeDesc.IsNullable) 1554WriteElements(new SourceInfo(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), $"{choiceName}i", elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 1558WriteElements(new SourceInfo(ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 1947if (arrayMapping.TypeDesc.IsNullable) 1963if (arrayMapping.TypeDesc.IsNullable) 2004if (structMapping.TypeDesc.IsNullable)