Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetNameInAttributeScope()

static void System.Xml.Linq.XNodeReader.GetNameInAttributeScope ( string qualifiedName,
XElement e,
out string localName,
out string namespaceName )
inlinestaticprivate

Definition at line 1025 of file XNodeReader.cs.

1026 {
1027 if (!string.IsNullOrEmpty(qualifiedName))
1028 {
1029 int num = qualifiedName.IndexOf(':');
1030 if (num != 0 && num != qualifiedName.Length - 1)
1031 {
1032 if (num == -1)
1033 {
1034 localName = qualifiedName;
1035 namespaceName = string.Empty;
1036 return;
1037 }
1038 XNamespace namespaceOfPrefix = e.GetNamespaceOfPrefix(qualifiedName.Substring(0, num));
1039 if (namespaceOfPrefix != null)
1040 {
1041 localName = qualifiedName.Substring(num + 1, qualifiedName.Length - num - 1);
1042 namespaceName = namespaceOfPrefix.NamespaceName;
1043 return;
1044 }
1045 }
1046 }
1047 localName = null;
1048 namespaceName = null;
1049 }

References System.Xml.Dictionary, System.Xml.Linq.XElement.GetNamespaceOfPrefix(), and System.Xml.Linq.XNamespace.NamespaceName.

Referenced by System.Xml.Linq.XNodeReader.GetAttribute(), and System.Xml.Linq.XNodeReader.MoveToAttribute().