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