28 writes to Namespace
System.Private.Xml (28)
System\Xml\Serialization\Mappings.cs (2)
177
newAccessor.
Namespace
= this.Namespace;
245
Namespace
= XmlReservedNs.NsXml;
System\Xml\Serialization\SoapReflectionImporter.cs (5)
89
element.
Namespace
= element.Mapping.Namespace ?? defaultNamespace;
129
element.
Namespace
= element.Mapping.Namespace ?? ns;
704
attribute.
Namespace
= a.SoapAttribute == null || a.SoapAttribute.Namespace == null ? ns : a.SoapAttribute.Namespace;
719
element.
Namespace
= ns;
733
element.
Namespace
= ns;
System\Xml\Serialization\XmlReflectionImporter.cs (12)
223
element.
Namespace
= ns;
1515
arrayItemElement.
Namespace
= xmlArrayItem.Namespace ?? arrayElementNs;
1601
attribute.
Namespace
= a.XmlAttribute.Namespace ?? ns;
1647
element.
Namespace
= rpc ? null : xmlElement.Namespace ?? ns;
1701
element.
Namespace
= anyNs ?? ns;
1743
arrayElement.
Namespace
= rpc ? null : a.XmlArray.Namespace ?? ns;
1780
attribute.
Namespace
= a.XmlAttribute.Namespace ?? ns;
1824
element.
Namespace
= rpc ? null : xmlElement.Namespace ?? ns;
1889
element.
Namespace
= rpc ? null : xmlElement.Namespace ?? ns;
1943
element.
Namespace
= anyNs ?? ns;
2251
element.
Namespace
= ns;
2280
element.
Namespace
= ns;
System\Xml\Serialization\XmlSchemaImporter.cs (9)
101
accessor.
Namespace
= typeName.Namespace;
168
accessor.
Namespace
= typeName.Namespace;
240
accessor.
Namespace
= ns;
296
accessor.
Namespace
= ns;
868
choiceAccessor.
Namespace
= ns;
1222
accessor.
Namespace
= ns;
1250
arrayAccessor.
Namespace
= ns;
1595
accessor.
Namespace
= XmlReservedNs.NsXml;
1630
accessor.
Namespace
= ns;
132 references to Namespace
System.Private.Xml (132)
System\Xml\Serialization\Mappings.cs (9)
135
return $"{
Namespace
?? "##any"}:{Name}";
139
return
Namespace
== defaultNs ? Name : $"{
Namespace
}:{Name}";
177
newAccessor.Namespace = this.
Namespace
;
250
if (
Namespace
== XmlReservedNs.NsXml)
830
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)
853
return (Attribute.Name == mapping.Attribute.Name && Attribute.
Namespace
== mapping.Attribute.
Namespace
&& Attribute.Form == mapping.Attribute.Form);
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
103
string elementNs = element.Form == XmlSchemaForm.Qualified ? element.
Namespace
! : string.Empty;
338
string? ns = element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: string.Empty;
763
string? ns = ele.Form == XmlSchemaForm.Qualified ? ele.
Namespace
: string.Empty;
813
string? ns = e!.Form == XmlSchemaForm.Qualified ? e.
Namespace
: string.Empty;
830
string? ns = element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: string.Empty;
1861
memberFound = XmlNodeEqual(Reader, attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (8)
84
string? ns = (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: string.Empty);
242
if (element.Name == elem.Name && element.
Namespace
== elem.NamespaceURI)
319
string? ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.
Namespace
: element.Mapping!.Namespace) : string.Empty);
339
WriteNullTagLiteral(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: string.Empty);
774
Writer.WriteStartAttribute(null, attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty);
850
string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty;
888
string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty;
1199
WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: string.Empty), mapping.IsSoap);
System\Xml\Serialization\XmlMapping.cs (1)
77
get { return _accessor.
Namespace
; }
System\Xml\Serialization\XmlMemberMapping.cs (1)
55
get { return Accessor!.
Namespace
; }
System\Xml\Serialization\XmlReflectionImporter.cs (40)
308
if (accessor.
Namespace
== ns) return accessor;
317
Accessor? existing = (Accessor?)accessors[accessor.Name, accessor.
Namespace
];
321
accessors.Add(accessor.Name, accessor.
Namespace
, accessor);
341
throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessorDefault, accessor.Name, accessor.
Namespace
, value1, value2));
346
throw new InvalidOperationException(SR.Format(SR.XmlMethodTypeNameConflict, accessor.Name, accessor.
Namespace
));
352
throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.
Namespace
, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping)));
369
throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.
Namespace
, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!)));
371
throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.
Namespace
, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!)));
1066
ns = element.
Namespace
;
1516
arrayItemElement.Mapping = ImportTypeMapping(_modelScope.GetTypeModel(targetType), arrayItemElement.
Namespace
, ImportContext.Element, xmlArrayItem.DataType, null, limiter);
1520
CheckForm(arrayItemElement.Form, arrayElementNs != arrayItemElement.
Namespace
);
1603
if (attribute.Form == XmlSchemaForm.None && ns != attribute.
Namespace
)
1608
CheckForm(attribute.Form, ns != attribute.
Namespace
);
1613
if (attribute.Form == XmlSchemaForm.Qualified && attribute.
Namespace
!= ns)
1648
element.Mapping = ImportTypeMapping(typeModel, rpc ? ns : element.
Namespace
, ImportContext.Element, xmlElement.DataType, null, limiter);
1668
CheckForm(element.Form, ns != element.
Namespace
);
1708
element.Mapping = ImportTypeMapping(typeModel, element.
Namespace
, ImportContext.Element, string.Empty, null, limiter);
1716
CheckForm(element.Form, ns != element.
Namespace
);
1719
elements.Add(element.Name, element.
Namespace
, element);
1745
_savedArrayNamespace = arrayElement.
Namespace
;
1754
CheckForm(arrayElement.Form, ns != arrayElement.
Namespace
);
1782
if (attribute.Form == XmlSchemaForm.None && ns != attribute.
Namespace
)
1787
CheckForm(attribute.Form, ns != attribute.
Namespace
);
1791
if (attribute.Form == XmlSchemaForm.Qualified && attribute.
Namespace
!= ns)
1826
element.Mapping = ImportTypeMapping(typeModel, rpc ? ns : element.
Namespace
, ImportContext.Element, xmlElement.DataType, null, limiter);
1841
CheckForm(element.Form, ns != element.
Namespace
);
1890
element.Mapping = ImportTypeMapping(typeModel, rpc ? ns : element.
Namespace
, ImportContext.Element, xmlElement.DataType, null, false, openModel, limiter);
1909
CheckForm(element.Form, ns != element.
Namespace
);
1951
element.Mapping = ImportTypeMapping(typeModel, element.
Namespace
, ImportContext.Element, string.Empty, null, false, openModel, limiter);
1958
CheckForm(element.Form, ns != element.
Namespace
);
1967
elements.Add(element.Name, element.
Namespace
, element);
2014
if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.
Namespace
== choiceNs)
2031
string id = element.
Namespace
!= null && element.
Namespace
.Length > 0 ? $"{element.
Namespace
}:{element.Name}" : element.Name;
2033
throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName, id, element.Name, element.
Namespace
));
2187
Accessor? existing = (Accessor?)scope[accessor.Name, accessor.
Namespace
];
2192
throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementName, existing.Name, existing.
Namespace
));
2200
throw new InvalidOperationException(SR.Format(SR.XmlDuplicateAttributeName, existing.Name, existing.
Namespace
));
2205
scope[accessor.Name, accessor.
Namespace
] = accessor;
System\Xml\Serialization\XmlSchemaExporter.cs (21)
48
XmlSchemaType? type = ExportSpecialMapping(special, xmlMembersMapping.Accessor.
Namespace
, false, null);
52
AddSchemaItem(type, xmlMembersMapping.Accessor.
Namespace
, null);
55
return (new XmlQualifiedName(xmlMembersMapping.Accessor.Name, xmlMembersMapping.Accessor.
Namespace
));
94
ExportMapping(member.Elements[0].Mapping!, member.Elements[0].
Namespace
, member.Elements[0].Any);
244
AddSchemaItem(element, accessor.
Namespace
, null);
245
ExportElementMapping(element, accessor.Mapping, accessor.
Namespace
, accessor.Any);
733
if (accessor.
Namespace
== null || accessor.
Namespace
== ns)
752
AddSchemaItem(attribute, accessor.
Namespace
, ns);
757
refAttribute.RefName = new XmlQualifiedName(accessor.Name, accessor.
Namespace
);
759
AddSchemaImport(accessor.
Namespace
, ns);
774
list.ItemTypeName = ExportPrimitiveMapping(pm, accessor.
Namespace
?? ns);
787
attribute.SchemaTypeName = ExportPrimitiveMapping(pm, accessor.
Namespace
?? ns);
808
if (accessor.
Namespace
!= null && accessor.
Namespace
.Length > 0 && accessor.
Namespace
!= ns)
809
any.Namespace = accessor.
Namespace
;
830
AddSchemaItem(element, accessor.
Namespace
, ns);
845
ExportElementMapping(element, (TypeMapping)accessor.Mapping!, accessor.
Namespace
, accessor.Any);
850
refElement.RefName = new XmlQualifiedName(accessor.Name, accessor.
Namespace
);
854
AddSchemaImport(accessor.
Namespace
, ns);
System\Xml\Serialization\XmlSchemaImporter.cs (4)
988
ElementAccessor? scopeElement = (ElementAccessor?)scope[element.Name, element.
Namespace
];
993
throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope, element.Name, element.
Namespace
));
997
throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope1, element.Name, element.
Namespace
));
1003
scope[element.Name, element.
Namespace
] = element;
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
269
WriteQuotedCSharpString(mapping.Accessor.
Namespace
);
System\Xml\Serialization\XmlSerializationILGen.cs (1)
349
ilg.Ldstr(GetCSharpString(mapping.Accessor.
Namespace
));
System\Xml\Serialization\XmlSerializationReader.cs (7)
2364
string? expectedElement = e.Form == XmlSchemaForm.Qualified ? e.
Namespace
: "";
2495
WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
2678
WriteXmlNodeEqual("Reader", element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
3715
WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: "");
3780
qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : $"{(attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: "")}:{attribute.Name}";
3992
string? ns = e.Form == XmlSchemaForm.Qualified ? e.
Namespace
: "";
4211
string? ns = e.Form == XmlSchemaForm.Qualified ? e.
Namespace
: "";
System\Xml\Serialization\XmlSerializationReaderILGen.cs (6)
323
string? expectedElement = e.Form == XmlSchemaForm.Qualified ? e.
Namespace
: "";
422
WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
1855
WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: "");
2006
qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : $"{(attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: "")}:{attribute.Name}";
2215
string? ns = e.Form == XmlSchemaForm.Qualified ? e.
Namespace
: "";
2474
string? ns = e.Form == XmlSchemaForm.Qualified ? e.
Namespace
: "";
System\Xml\Serialization\XmlSerializationWriter.cs (14)
2630
WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""), mapping.IsSoap);
2830
WriteEncodedNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""));
2832
WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""));
2835
WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""));
3309
string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty;
3433
string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty;
3479
WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: "", attribute.Default, source, attribute.Mapping, false, false, false);
3782
WriteQuotedCSharpString(element.
Namespace
);
3913
string? ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.
Namespace
: element.Mapping!.Namespace) : "");
3933
WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
4251
WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
4471
if ((element.Form == XmlSchemaForm.Unqualified && choiceNs.IsEmpty) || choiceNs.SequenceEqual(element.
Namespace
))
4489
throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.
Namespace
}:{element.Name}", element.Name, element.
Namespace
));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
391
WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""), false);
567
WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""));
570
WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: ""));
1173
string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty;
1319
string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: string.Empty;
1381
WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.
Namespace
: "", GetConvertedDefaultValue(source.Type, attribute.Default), source, attribute.Mapping, false, false, false);
1733
ilg.Ldstr(GetCSharpString(element.
Namespace
));
1899
string? ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.
Namespace
: element.Mapping!.Namespace) : "");
1926
WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
2188
WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.
Namespace
: "");
2264
if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.
Namespace
== choiceNs)
2280
throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.
Namespace
}:{element.Name}", element.Name, element.
Namespace
));