41 writes to Name
System.Xml (41)
System\Xml\Serialization\Mappings.cs (2)
148newAccessor.Name = this.Name; 205Name = Name.Substring("xml:".Length);
System\Xml\Serialization\SoapReflectionImporter.cs (5)
111element.Name = element.Mapping.DefaultElementName; 151element.Name = elementName == null || elementName.Length == 0 ? elementName : XmlConvert.EncodeLocalName(elementName); 649attribute.Name = Accessor.EscapeQName(a.SoapAttribute == null || a.SoapAttribute.AttributeName.Length == 0 ? accessorName : a.SoapAttribute.AttributeName); 663element.Name = XmlConvert.EncodeLocalName(a.SoapElement == null || a.SoapElement.ElementName.Length == 0 ? accessorName : a.SoapElement.ElementName); 676element.Name = mapping.TypeName; //XmlConvert.EncodeLocalName(name == null || name.Length == 0 ? mapping.TypeName : name);
System\Xml\Serialization\SoapSchemaImporter.cs (7)
70accessor.Name = name.Name; 95accessor.Name = name; 151accessor.Name = name; 172accessor.Name = element.Name; 389arrayAccessor.Name = element.Name; 405itemAccessor.Name = Soap.UrType; 458itemAccessor.Name = typeName.Name;
System\Xml\Serialization\XmlReflectionImporter.cs (17)
197element.Name = elementName == null || elementName.Length == 0 ? elementName : XmlConvert.EncodeLocalName(elementName); 250element.Name = XmlConvert.EncodeLocalName(root.ElementName); 1308arrayItemElement.Name = xmlArrayItem.ElementName.Length == 0 ? arrayItemElement.Mapping.DefaultElementName : XmlConvert.EncodeLocalName(xmlArrayItem.ElementName); 1382attribute.Name = Accessor.EscapeQName(a.XmlAttribute.AttributeName.Length == 0 ? accessorName : a.XmlAttribute.AttributeName); 1410text.Name = accessorName; // unused except to make more helpful error messages 1429element.Name = XmlConvert.EncodeLocalName(xmlElement.ElementName.Length == 0 ? accessorName : xmlElement.ElementName); 1433element.Name = xmlElement.ElementName.Length == 0 ? element.Mapping.DefaultElementName : XmlConvert.EncodeLocalName(xmlElement.ElementName); 1472element.Name = anyName; 1511arrayElement.Name = XmlConvert.EncodeLocalName(a.XmlArray.ElementName.Length == 0 ? accessorName : a.XmlArray.ElementName); 1544attribute.Name = Accessor.EscapeQName(a.XmlAttribute.AttributeName.Length == 0 ? accessorName : a.XmlAttribute.AttributeName); 1567text.Name = accessorName; // unused except to make more helpful error messages 1582element.Name = XmlConvert.EncodeLocalName(xmlElement.ElementName.Length == 0 ? accessorName : xmlElement.ElementName); 1641element.Name = XmlConvert.EncodeLocalName(xmlElement.ElementName.Length == 0 ? accessorName : xmlElement.ElementName); 1644element.Name = xmlElement.ElementName.Length == 0 ? element.Mapping.DefaultElementName : XmlConvert.EncodeLocalName(xmlElement.ElementName); 1687element.Name = anyName; 1943element.Name = mapping.DefaultElementName; 1967element.Name = XmlConvert.EncodeLocalName(typeName);
System\Xml\Serialization\XmlSchemaImporter.cs (9)
137accessor.Name = typeName.Name; 199accessor.Name = elementName; 266accessor.Name = Accessor.EscapeName(name); 312accessor.Name = element.Name; 845choiceAccessor.Name = choiceIdentifier.Name; 851choiceAccessor.Name = choiceIdentifier.Name = member.ChoiceIdentifier.MemberName = membersScope.AddUnique(member.ChoiceIdentifier.MemberName, choiceIdentifier); 1171arrayAccessor.Name = element.Name; 1479accessor.Name = name.Name; 1513accessor.Name = attribute.Name;
System\Xml\Serialization\XmlSerializer.cs (1)
730element.Name = typeDesc.DataType.Name;
160 references to Name
System.Xml (160)
System\Xml\Serialization\CodeExporter.cs (1)
205if (arrayMapping.Elements[i].Name != arrayMapping.Elements[i].Mapping.DefaultElementName) {
System\Xml\Serialization\Compilation.cs (2)
588throw new InvalidOperationException(Res.GetString(Res.XmlNotSerializable, mapping.Accessor.Name)); 615throw new InvalidOperationException(Res.GetString(Res.XmlNotSerializable, mapping.Accessor.Name));
System\Xml\Serialization\Mappings.cs (13)
114return (Namespace == null ? "##any" : Namespace) + ":" + Name; 117return Namespace == defaultNs ? Name : Namespace + ":" + Name; 148newAccessor.Name = this.Name; 199int colon = Name.LastIndexOf(':'); 202if (!Name.StartsWith("xml:", StringComparison.Ordinal)) { 203throw new InvalidOperationException(Res.GetString(Res.Xml_InvalidNameChars, Name)); 205Name = Name.Substring("xml:".Length); 544throw new InvalidOperationException(Res.GetString(Res.XmlIllegalTypedTextAttribute, TypeDesc.FullName, text.Name, text.Mapping.TypeDesc.FullName)); 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\SoapCodeExporter.cs (1)
211string elemName = Accessor.UnescapeName(element.Name);
System\Xml\Serialization\SoapSchemaExporter.cs (1)
260element.Name = accessor.Name;
System\Xml\Serialization\SoapSchemaImporter.cs (1)
497member.Name = CodeIdentifier.MakeValid(Accessor.UnescapeName(accessor.Name));
System\Xml\Serialization\XmlCodeExporter.cs (10)
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); 387AddWarningComment(comments, Res.GetString(Res.XmlDropArrayAttributeValue, attributeName, defaultValue.ToString(), ((ElementAccessor)accessor).Name)); 577AddRootMetadata(metadata, mapping.Mapping, Accessor.UnescapeName(mapping.Accessor.Name), mapping.Accessor.Namespace, mapping.Accessor); 600string elementName = Accessor.UnescapeName(arrayElement.Name); 624string attrName = Accessor.UnescapeName(attribute.Name); 650string elemName = Accessor.UnescapeName(element.Name); 682string elemName = Accessor.UnescapeName(element.Name);
System\Xml\Serialization\XmlMapping.cs (2)
57get { return System.Xml.Serialization.Accessor.UnescapeName(Accessor.Name); } 65get { return Accessor.Name; }
System\Xml\Serialization\XmlMemberMapping.cs (2)
42get { return Accessor.UnescapeName(Accessor.Name); } 50get { return Accessor.Name; }
System\Xml\Serialization\XmlReflectionImporter.cs (24)
278if (accessor.Any && accessor.Name.Length == 0) 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))); 765throw new InvalidOperationException(Res.GetString(Res.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.Mapping.TypeDesc.FullName)); 1478if (element.Name.Length > 0) 1490elements.Add(element.Name, element.Namespace, element); 1694if (element.Name.Length > 0) 1710elements.Add(element.Name, element.Namespace, element); 1721throw new InvalidOperationException(Res.GetString(Res.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 1737if (element.Any && element.Name.Length == 0) { 1750if (element.Name == choiceName) { 1759if (element.Any && element.Name.Length == 0) { 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 (13)
62type.Name = xmlMembersMapping.Accessor.Name; 66return (new XmlQualifiedName(xmlMembersMapping.Accessor.Name, xmlMembersMapping.Accessor.Namespace)); 93throw new InvalidOperationException(Res.GetString(Res.XmlBareAttributeMember, member.Attribute.Name)); 95throw new InvalidOperationException(Res.GetString(Res.XmlBareTextMember, member.Text.Name)); 100throw new InvalidOperationException(Res.GetString(Res.XmlIllegalArrayElement, member.Elements[0].Name)); 231if (accessor.Any && accessor.Name.Length == 0) 236element.Name = accessor.Name; 632attribute.RefName = new XmlQualifiedName(accessor.Name, XmlReservedNs.NsXml); 661attribute.Name = accessor.Name; 682refAttribute.RefName = new XmlQualifiedName(accessor.Name, accessor.Namespace); 720if (accessor.Any && accessor.Name.Length == 0) { 736element.Name = accessor.Name; 760refElement.RefName = new XmlQualifiedName(accessor.Name, accessor.Namespace);
System\Xml\Serialization\XmlSchemaImporter.cs (10)
238member.Name = CodeIdentifier.MakeValid(Accessor.UnescapeName(accessor.Name)); 853members.Add(choiceAccessor.Name, choiceIdentifier); 867if (item.Name != itemMapping.DefaultElementName) 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; 1333string name = CodeIdentifier.MakeValid(Accessor.UnescapeName(accessor.Name)); 1374member.Name = CodeIdentifier.MakeValid(Accessor.UnescapeName(accessor.Name)); 1669string constantName = CodeIdentifier.MakeValid(element.Name);
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
274WriteQuotedCSharpString(mapping.Accessor.Name);
System\Xml\Serialization\XmlSerializationILGen.cs (1)
330ilg.Ldstr(mapping.Accessor.Name);
System\Xml\Serialization\XmlSerializationReader.cs (19)
2235expectedElement += e.Name; 2334string methodName = NextMethodName(element.Name); 2351WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2394if (mapping.Elements[j].Any && mapping.Elements[j].Name.Length == 0) { 2494string methodName = NextMethodName(element.Name); 2513WriteXmlNodeEqual("Reader", element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2618string methodName = NextMethodName(element.Name); 3113if (mapping.Elements[j].Any && (mapping.Elements[j].Name == null || mapping.Elements[j].Name.Length == 0)) { 3462WriteXmlNodeEqual("Reader", attribute.Name, XmlReservedNs.NsXml); 3465WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : ""); 3524qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : (attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "") + ":" + attribute.Name; 3715if (e.Any && (e.Name == null || e.Name.Length == 0)) continue; 3719qnames += ns + ":" + e.Name; 3862if (element.Any && element.Name.Length == 0) { 3907if (!isSequence && e.Any && (e.Name == null || e.Name.Length == 0)) continue; 3944WriteXmlNodeEqual("Reader", e.Name, ns);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (17)
323expectedElement += e.Name; 404string methodName = NextMethodName(element.Name); 442WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 485if (mapping.Elements[j].Any && mapping.Elements[j].Name.Length == 0) { 645string methodName = NextMethodName(element.Name); 1587if (mapping.Elements[j].Any && (mapping.Elements[j].Name == null || mapping.Elements[j].Name.Length == 0)) { 1892WriteXmlNodeEqual("Reader", attribute.Name, XmlReservedNs.NsXml); 1895WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : ""); 2064qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : (attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "") + ":" + attribute.Name; 2265if (e.Any && (e.Name == null || e.Name.Length == 0)) continue; 2269qnames += ns + ":" + e.Name; 2486if (element.Any && element.Name.Length == 0) { 2526if (!isSequence && e.Any && (e.Name == null || e.Name.Length == 0)) continue; 2568WriteXmlNodeEqual("Reader", e.Name, ns, false);
System\Xml\Serialization\XmlSerializationWriter.cs (22)
1609string methodName = NextMethodName(element.Name); 1628WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), mapping.IsSoap); 1747WriteQuotedCSharpString(member.Elements[0].Name); 1791string methodName = NextMethodName(element.Name); 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 : "")); 2224WriteQuotedCSharpString(attribute.Name); 2328WriteQuotedCSharpString(attribute.Name); 2369WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", attribute.Default, source, attribute.Mapping, false, false, false); 2536if (element.Name != null && element.Name.Length > 0) 2631WriteQuotedCSharpString(element.Name); 2747string name = writeAccessor ? element.Name : element.Mapping.TypeName; 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 : ""); 3195if (element.Any && element.Name.Length == 0) { 3209if (element.Name == choiceName) { 3220if (element.Any && element.Name.Length == 0) { 3225throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingValue, choiceMapping.TypeDesc.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (20)
326string methodName = NextMethodName(element.Name); 365WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), false); 503string methodName = NextMethodName(element.Name); 525WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 528WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 1143ilg.Ldstr(attribute.Name); 1285ilg.Ldstr(attribute.Name); 1347WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", GetConvertedDefaultValue(source.Type, attribute.Default), source, attribute.Mapping, false, false, false); 1545if (element.Name != null && element.Name.Length > 0) 1666ilg.Ldstr(element.Name); 1846string name = writeAccessor ? element.Name : element.Mapping.TypeName; 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 : ""); 2178if (element.Any && element.Name.Length == 0) { 2190if (element.Name == choiceName) { 2199if (element.Any && element.Name.Length == 0) { 2204throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingValue, choiceMapping.TypeDesc.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));