35 writes to Namespace
System.Xml (35)
System\Xml\Serialization\Mappings.cs (2)
150newAccessor.Namespace = this.Namespace; 206Namespace = XmlReservedNs.NsXml;
System\Xml\Serialization\SoapReflectionImporter.cs (5)
112element.Namespace = element.Mapping.Namespace == null ? defaultNamespace : element.Mapping.Namespace; 155element.Namespace = element.Mapping.Namespace == null ? ns : element.Mapping.Namespace; 650attribute.Namespace = a.SoapAttribute == null || a.SoapAttribute.Namespace == null ? ns : a.SoapAttribute.Namespace; 664element.Namespace = ns; 677element.Namespace = ns;
System\Xml\Serialization\SoapSchemaImporter.cs (7)
71accessor.Namespace = name.Namespace; 96accessor.Namespace = typeMapping.Namespace != null ? typeMapping.Namespace : ns; 152accessor.Namespace = ns; 173accessor.Namespace = ns; 390arrayAccessor.Namespace = ns; 406itemAccessor.Namespace = ns; 459itemAccessor.Namespace = ns;
System\Xml\Serialization\XmlReflectionImporter.cs (12)
198element.Namespace = ns; 1306arrayItemElement.Namespace = xmlArrayItem.Namespace == null ? arrayElementNs : xmlArrayItem.Namespace; 1383attribute.Namespace = a.XmlAttribute.Namespace == null ? ns : a.XmlAttribute.Namespace; 1426element.Namespace = rpc ? null : xmlElement.Namespace == null ? ns : xmlElement.Namespace; 1473element.Namespace = anyNs == null ? ns : anyNs; 1512arrayElement.Namespace = rpc ? null : a.XmlArray.Namespace == null ? ns : a.XmlArray.Namespace; 1545attribute.Namespace = a.XmlAttribute.Namespace == null ? ns : a.XmlAttribute.Namespace; 1583element.Namespace = rpc ? null : xmlElement.Namespace == null ? ns : xmlElement.Namespace; 1638element.Namespace = rpc ? null : xmlElement.Namespace == null ? ns : xmlElement.Namespace; 1688element.Namespace = anyNs == null ? ns : anyNs; 1944element.Namespace = ns; 1968element.Namespace = ns;
System\Xml\Serialization\XmlSchemaImporter.cs (9)
138accessor.Namespace = typeName.Namespace; 200accessor.Namespace = typeName.Namespace; 267accessor.Namespace = ns; 313accessor.Namespace = ns; 846choiceAccessor.Namespace = ns; 1148accessor.Namespace = ns; 1172arrayAccessor.Namespace = ns; 1480accessor.Namespace = XmlReservedNs.NsXml; 1514accessor.Namespace = ns;
139 references to Namespace
System.Xml (139)
System\Xml\Serialization\Mappings.cs (10)
114return (Namespace == null ? "##any" : Namespace) + ":" + Name; 117return Namespace == defaultNs ? Name : Namespace + ":" + Name; 150newAccessor.Namespace = this.Namespace; 210if (Namespace == XmlReservedNs.NsXml) { 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) 753return (Attribute.Name == mapping.Attribute.Name && Attribute.Namespace == mapping.Attribute.Namespace && Attribute.Form == mapping.Attribute.Form);
System\Xml\Serialization\SoapSchemaExporter.cs (1)
263element.SchemaTypeName = ExportTypeMapping(accessor.Mapping, accessor.Namespace);
System\Xml\Serialization\XmlCodeExporter.cs (17)
86ExportType(mapping.Attribute.Mapping, Accessor.UnescapeName(mapping.Attribute.Name), mapping.Attribute.Namespace, null, false); 91ExportType(element.Mapping, Accessor.UnescapeName(element.Name), element.Namespace, null, false); 95ExportType(mapping.Text.Mapping, Accessor.UnescapeName(mapping.Text.Name), mapping.Text.Namespace, null, false); 102ExportType(element.Mapping, Accessor.UnescapeName(element.Name), element.Namespace, element, true); 577AddRootMetadata(metadata, mapping.Mapping, Accessor.UnescapeName(mapping.Accessor.Name), mapping.Accessor.Namespace, mapping.Accessor); 603bool sameElementNs = arrayElement.Form == XmlSchemaForm.Unqualified || arrayElement.Namespace == ns; 607ExportArrayItem(metadata, sameName ? null : elementName, sameElementNs ? null : arrayElement.Namespace, sameElementType ? null : elementMapping.TypeDesc, elementMapping.TypeDesc, arrayElement.IsNullable, defaultForm ? XmlSchemaForm.None : arrayElement.Form, nestingLevel); 628bool sameNs = attribute.Namespace == ns; 632sameNs || defaultForm ? null : attribute.Namespace, 653bool sameNs = element.Namespace == ns; 657ExportAnyElement(metadata, elemName, element.Namespace, member.SequenceId); 662ExportArray(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 668ExportArrayElements(metadata, array, element.Namespace, member.TypeDesc.ArrayElementTypeDesc, 0); 675ExportElement(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, sameType ? null : mapping.TypeDesc, mapping.TypeDesc, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 683bool sameNs = element.Namespace == ns; 685ExportAnyElement(metadata, elemName, element.Namespace, 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\XmlMapping.cs (1)
73get { return accessor.Namespace; }
System\Xml\Serialization\XmlMemberMapping.cs (1)
58get { return Accessor.Namespace; }
System\Xml\Serialization\XmlReflectionImporter.cs (40)
273if (accessor.Namespace == ns) return accessor; 281Accessor existing = (Accessor)accessors[accessor.Name, accessor.Namespace]; 284accessors.Add(accessor.Name, accessor.Namespace, accessor); 302throw new InvalidOperationException(Res.GetString(Res.XmlCannotReconcileAccessorDefault, accessor.Name, accessor.Namespace, value1, value2)); 307throw new InvalidOperationException(Res.GetString(Res.XmlMethodTypeNameConflict, accessor.Name, accessor.Namespace)); 311throw new InvalidOperationException(Res.GetString(Res.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping), GetMappingName(accessor.Mapping))); 327throw new InvalidOperationException(Res.GetString(Res.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping), GetMappingName(accessor.Mapping))); 329throw new InvalidOperationException(Res.GetString(Res.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping), GetMappingName(accessor.Mapping))); 927ns = element.Namespace; 1307arrayItemElement.Mapping = ImportTypeMapping(modelScope.GetTypeModel(targetType), arrayItemElement.Namespace, ImportContext.Element, xmlArrayItem.DataType, null, limiter); 1311CheckForm(arrayItemElement.Form, arrayElementNs != arrayItemElement.Namespace); 1385if (attribute.Form == XmlSchemaForm.None && ns != attribute.Namespace) { 1389CheckForm(attribute.Form, ns != attribute.Namespace); 1394if (attribute.Form == XmlSchemaForm.Qualified && attribute.Namespace != ns) { 1427element.Mapping = ImportTypeMapping(typeModel, rpc ? ns : element.Namespace, ImportContext.Element, xmlElement.DataType, null, limiter); 1444CheckForm(element.Form, ns != element.Namespace); 1480element.Mapping = ImportTypeMapping(typeModel, element.Namespace, ImportContext.Element, String.Empty, null, limiter); 1487CheckForm(element.Form, ns != element.Namespace); 1490elements.Add(element.Name, element.Namespace, element); 1514savedArrayNamespace = arrayElement.Namespace; 1522CheckForm(arrayElement.Form, ns != arrayElement.Namespace); 1547if (attribute.Form == XmlSchemaForm.None && ns != attribute.Namespace) { 1551CheckForm(attribute.Form, ns != attribute.Namespace); 1555if (attribute.Form == XmlSchemaForm.Qualified && attribute.Namespace != ns) { 1585element.Mapping = ImportTypeMapping(typeModel, rpc ? ns : element.Namespace, ImportContext.Element, xmlElement.DataType, null, limiter); 1598CheckForm(element.Form, ns != element.Namespace); 1639element.Mapping = ImportTypeMapping(typeModel, rpc ? ns : element.Namespace, ImportContext.Element, xmlElement.DataType, null, false, openModel, limiter); 1655CheckForm(element.Form, ns != element.Namespace); 1696element.Mapping = ImportTypeMapping(typeModel, element.Namespace, ImportContext.Element, String.Empty, null, false, openModel, limiter); 1702CheckForm(element.Form, ns != element.Namespace); 1710elements.Add(element.Name, element.Namespace, element); 1751if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs) { 1764string id = element.Namespace != null && element.Namespace.Length > 0 ? element.Namespace + ":" + element.Name : element.Name; 1766throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping.TypeDesc.FullName, id, element.Name, element.Namespace)); 1894Accessor existing = (Accessor)scope[accessor.Name, accessor.Namespace]; 1897throw new InvalidOperationException(Res.GetString(Res.XmlDuplicateElementName, existing.Name, existing.Namespace)); 1904throw new InvalidOperationException(Res.GetString(Res.XmlDuplicateAttributeName, existing.Name, existing.Namespace)); 1908scope[accessor.Name, accessor.Namespace] = accessor;
System\Xml\Serialization\XmlSchemaExporter.cs (23)
60XmlSchemaType type = ExportSpecialMapping(special, xmlMembersMapping.Accessor.Namespace, false, null); 63AddSchemaItem(type, xmlMembersMapping.Accessor.Namespace, null); 66return (new XmlQualifiedName(xmlMembersMapping.Accessor.Name, xmlMembersMapping.Accessor.Namespace)); 106ExportMapping(member.Elements[0].Mapping, member.Elements[0].Namespace, member.Elements[0].Any); 240AddSchemaItem(element, accessor.Namespace, null); 241ExportElementMapping(element, accessor.Mapping, accessor.Namespace, accessor.Any); 662if (accessor.Namespace == null || accessor.Namespace == ns) { 677AddSchemaItem(attribute, accessor.Namespace, ns); 682refAttribute.RefName = new XmlQualifiedName(accessor.Name, accessor.Namespace); 684AddSchemaImport(accessor.Namespace, ns); 696list.ItemTypeName = ExportPrimitiveMapping(pm, accessor.Namespace == null ? ns : accessor.Namespace); 706attribute.SchemaTypeName = ExportPrimitiveMapping(pm, accessor.Namespace == null ? ns : accessor.Namespace); 724if (accessor.Namespace != null && accessor.Namespace.Length > 0 && accessor.Namespace != ns) 725any.Namespace = accessor.Namespace; 743AddSchemaItem(element, accessor.Namespace, ns); 756ExportElementMapping(element, (TypeMapping)accessor.Mapping, accessor.Namespace, accessor.Any); 760refElement.RefName = new XmlQualifiedName(accessor.Name, accessor.Namespace); 764AddSchemaImport(accessor.Namespace, ns);
System\Xml\Serialization\XmlSchemaImporter.cs (4)
948ElementAccessor scopeElement = (ElementAccessor)scope[element.Name, element.Namespace]; 951throw new InvalidOperationException(Res.GetString(Res.XmlDuplicateElementInScope, element.Name, element.Namespace)); 954throw new InvalidOperationException(Res.GetString(Res.XmlDuplicateElementInScope1, element.Name, element.Namespace)); 959scope[element.Name, element.Namespace] = element;
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
276WriteQuotedCSharpString(mapping.Accessor.Namespace);
System\Xml\Serialization\XmlSerializationILGen.cs (1)
331ilg.Ldstr(mapping.Accessor.Namespace);
System\Xml\Serialization\XmlSerializationReader.cs (7)
2233string expectedElement = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 2351WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2513WriteXmlNodeEqual("Reader", element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 3465WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : ""); 3524qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : (attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "") + ":" + attribute.Name; 3714string ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 3906string ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : "";
System\Xml\Serialization\XmlSerializationReaderILGen.cs (6)
321string expectedElement = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 442WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 1895WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : ""); 2064qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : (attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "") + ":" + attribute.Name; 2264string ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 2525string ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : "";
System\Xml\Serialization\XmlSerializationWriter.cs (14)
1628WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), mapping.IsSoap); 1804WriteEncodedNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 1806WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 1809WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 2226string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 2330string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 2369WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", attribute.Default, source, attribute.Mapping, false, false, false); 2633WriteQuotedCSharpString(element.Namespace); 2748string ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping.Namespace) : ""); 2766WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 3048WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 3210if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs) { 3225throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingValue, choiceMapping.TypeDesc.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (13)
365WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), false); 525WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 528WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 1125string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 1287string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 1347WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", GetConvertedDefaultValue(source.Type, attribute.Default), source, attribute.Mapping, false, false, false); 1678ilg.Ldstr(element.Namespace); 1847string ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping.Namespace) : ""); 1873WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2125WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2191if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs) { 2204throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingValue, choiceMapping.TypeDesc.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));