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