25 writes to IsNullable
System.Xml (25)
System\Xml\Serialization\SoapReflectionImporter.cs (2)
613member.Elements[0].IsNullable = false; 668element.IsNullable = a.SoapElement.IsNullable;
System\Xml\Serialization\SoapSchemaImporter.cs (7)
73accessor.IsNullable = true; 98accessor.IsNullable = false; 154accessor.IsNullable = false; 175accessor.IsNullable = element.IsNillable; 392arrayAccessor.IsNullable = false; 408itemAccessor.IsNullable = true; 461itemAccessor.IsNullable = true;
System\Xml\Serialization\XmlReflectionImporter.cs (10)
254element.IsNullable = root.IsNullableSpecified ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 258element.IsNullable = model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 1208member.Elements[0].IsNullable = false; 1309arrayItemElement.IsNullable = xmlArrayItem.IsNullableSpecified ? xmlArrayItem.IsNullable : targetTypeDesc.IsNullable || targetTypeDesc.IsOptionalValue; 1439element.IsNullable = xmlElement.IsNullableSpecified ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1482element.IsNullable = false; 1517arrayElement.IsNullable = a.XmlArray.IsNullable; 1593element.IsNullable = xmlElement.IsNullableSpecified ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1650element.IsNullable = xmlElement.IsNullableSpecified ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1698element.IsNullable = false;
System\Xml\Serialization\XmlSchemaImporter.cs (4)
143accessor.IsNullable = typeMapping.TypeDesc.IsNullable; 269accessor.IsNullable = false; 327accessor.IsNullable = element.IsNillable; 1175arrayAccessor.IsNullable = element.IsNillable;
System\Xml\Serialization\XmlSerializationReader.cs (1)
2991element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
1338element.IsNullable = nullableMapping.BaseMapping.TypeDesc.IsNullable;
62 references to IsNullable
System.Xml (62)
System\Xml\Serialization\Mappings.cs (3)
709return element.IsNullable && element.Mapping.TypeDesc.IsValueType; 735if (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\SoapCodeExporter.cs (2)
214if (!sameName || mapping.TypeDesc.IsAmbiguousDataType || element.IsNullable) { 215AddElementMetadata(metadata, sameName ? null : elemName, mapping.TypeDesc.IsAmbiguousDataType ? mapping.TypeDesc : null, element.IsNullable);
System\Xml\Serialization\SoapSchemaExporter.cs (1)
261element.IsNillable = accessor.IsNullable || accessor.Mapping is NullableMapping;
System\Xml\Serialization\XmlCodeExporter.cs (8)
184if ((object)(rootElement.IsNullable) != null) { 185attribute.Arguments.Add(new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression((bool)rootElement.IsNullable))); 604bool sameNullable = arrayElement.IsNullable == elementMapping.TypeDesc.IsNullable; 607ExportArrayItem(metadata, sameName ? null : elementName, sameElementNs ? null : arrayElement.Namespace, sameElementType ? null : elementMapping.TypeDesc, elementMapping.TypeDesc, arrayElement.IsNullable, defaultForm ? XmlSchemaForm.None : arrayElement.Form, nestingLevel); 661if (!sameName || !sameNs || element.IsNullable || !defaultForm || member.SequenceId != -1) 662ExportArray(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 675ExportElement(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, sameType ? null : mapping.TypeDesc, mapping.TypeDesc, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 688ExportElement(metadata, elemName, sameNs ? null : element.Namespace, ((TypeMapping)element.Mapping).TypeDesc, ((TypeMapping)element.Mapping).TypeDesc, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
255CheckNullable(element.IsNullable, model.TypeDesc, element.Mapping); 1312CheckNullable(arrayItemElement.IsNullable, targetTypeDesc, arrayItemElement.Mapping); 1442CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1485CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1520CheckNullable(arrayElement.IsNullable, accessor.TypeDesc, arrayElement.Mapping); 1596CheckNullable(element.IsNullable, accessor.TypeDesc, element.Mapping); 1652CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping); 1700CheckNullable(element.IsNullable, targetTypeDesc, element.Mapping);
System\Xml\Serialization\XmlSchemaExporter.cs (3)
237element.IsNillable = accessor.IsNullable; 730int minOccurs = repeats || accessor.HasDefault || (!accessor.IsNullable && !accessor.Mapping.TypeDesc.IsValueType) || valueTypeOptional ? 0 : 1; 735element.IsNillable = accessor.IsNullable;
System\Xml\Serialization\XmlSchemaImporter.cs (3)
778if (!nullableMismatch && existingElement.IsNullable != element.IsNullable) 875if (item.IsNullable != item.Mapping.TypeDesc.IsNullable)
System\Xml\Serialization\XmlSerializationReader.cs (3)
4254WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, fixupIndex); 4269if (element.IsNullable) { 4400WriteBooleanValue(element.IsNullable);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
2990WriteArray(source, arrayName, (ArrayMapping)element.Mapping, readOnly, element.IsNullable, fixupIndex, elementIndex); 3013if (element.IsNullable) { 3185ilg.Load(element.IsNullable);
System\Xml\Serialization\XmlSerializationWriter.cs (15)
1802if (element.IsNullable){ 2553if (isNullable && !element.IsNullable) { 2622if (isNullable && !element.IsNullable) { 2763if (element.IsNullable) { 2788WriteValue(element.IsNullable); 2799if (element.IsNullable) { 2851if (element.IsNullable) { 2887WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 2893WriteQualifiedNameElement(name, ns, element.Default, source, element.IsNullable, mapping.IsSoap, mapping); 2897WritePrimitive(element.IsNullable ? ("WriteNullableString" + suffixNullable + suffixRaw) : ("WriteElementString" + suffixRaw), 2898name, ns, element.Default, source, mapping, mapping.IsSoap, true, element.IsNullable); 2919WriteValue(element.IsNullable); 2941WriteValue(element.IsNullable); 2955WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 2969WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
524if (element.IsNullable) { 1560if (isNullable && !element.IsNullable) { 1634if (isNullable && !element.IsNullable) { 1871if (element.IsNullable) { 1886if (element.IsNullable) { 1899if (element.IsNullable) { 1911WritePrimitive("WriteElementString", name, ns, element.Default, source, element.Mapping, false, true, element.IsNullable); 1916WriteQualifiedNameElement(name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, element.IsNullable, mapping); 1919WritePrimitive(element.IsNullable ? ("WriteNullableStringLiteral" + suffixRaw) : ("WriteElementString" + suffixRaw), 1920name, ns, GetConvertedDefaultValue(source.Type, element.Default), source, mapping, false, true, element.IsNullable); 1941ilg.Ldc(element.IsNullable); 1960WriteElementCall("WriteSerializable", typeof(IXmlSerializable), source, name, ns, element.IsNullable, !element.Any); 1978WriteElementCall("WriteElementLiteral", typeof(XmlNode), source, name, ns, element.IsNullable, element.Any);