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); 943isNullable: mapping.TypeDesc!.IsNullable && element.IsNullable, 1025object? WriteStruct() => WriteStructMethod(structMapping, mapping.TypeDesc!.IsNullable, true, defaultNamespace: null); 1244element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable; 1557if (structMapping.TypeDesc!.IsNullable && isNull)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
52CreateXmlSerializationWriteCallback(mapping, mapping.TypeName!, mapping.Namespace, mapping.TypeDesc.IsNullable) 125WriteElements(o, elements, text, choice, writeAccessors, memberTypeDesc.IsNullable); 136if (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; 1518arrayItemElement.IsNullable = xmlArrayItem.GetIsNullableSpecified() ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 2233if (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)
3078if (derived.TypeDesc.IsNullable) 3197element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable; 3224if (structMapping.TypeDesc.IsNullable) 3232if (structMapping.TypeDesc.IsNullable) 3283if (structMapping.TypeDesc.IsNullable) 3321member.IsNullable = mapping.TypeDesc!.IsNullable; 3944if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.TypeDesc.IsNullable) 4314WriteElement(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); 4794if (mapping.TypeDesc!.IsNullable)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (8)
1147if (derived.TypeDesc!.IsNullable) 1307element.IsNullable = nullableMapping.BaseMapping!.TypeDesc!.IsNullable; 1332if (structMapping.TypeDesc.IsNullable) 1371if (structMapping.TypeDesc.IsNullable) 1484if (structMapping.TypeDesc.IsNullable) 1545member.IsNullable = mapping.TypeDesc!.IsNullable; 2533WriteElement(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)
2994if (derived.TypeDesc.IsNullable) 3098if (mapping.TypeDesc.IsNullable) 3102if (mapping.TypeDesc.IsNullable) 3297if (memberTypeDesc.IsNullable) 3445if (memberTypeDesc.IsNullable) 3490WriteElements(source, choiceSource, elements, text, choice, "a", writeAccessors, memberTypeDesc.IsNullable); 3501if (arrayTypeDesc.IsNullable) 3524if (arrayTypeDesc.IsNullable) 3624WriteElements($"{arrayName}i", $"{choiceName}i", elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.IsNullable); 3628WriteElements(RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), elements, text, choice, $"{arrayName}a", true, arrayElementTypeDesc.IsNullable); 3976if (arrayMapping.TypeDesc.IsNullable) 4034if (arrayMapping.TypeDesc.IsNullable) 4127if (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)