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