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

◆ GetNamespaceOfPrefix()

XNamespace? System.Xml.Linq.XElement.GetNamespaceOfPrefix ( string prefix)
inline

Definition at line 279 of file XElement.cs.

280 {
281 if (prefix == null)
282 {
283 throw new ArgumentNullException("prefix");
284 }
285 if (prefix.Length == 0)
286 {
288 }
289 if (prefix == "xmlns")
290 {
291 return XNamespace.Xmlns;
292 }
294 if (namespaceOfPrefixInScope != null)
295 {
296 return XNamespace.Get(namespaceOfPrefixInScope);
297 }
298 if (prefix == "xml")
299 {
300 return XNamespace.Xml;
301 }
302 return null;
303 }
static string Argument_InvalidPrefix
Definition SR.cs:26
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
string GetNamespaceOfPrefixInScope(string prefix, XElement outOfScope)
Definition XElement.cs:1095

References System.SR.Argument_InvalidPrefix, System.Xml.ArgumentException, System.SR.Format(), System.Xml.Linq.XNamespace.Get(), System.Xml.Linq.XElement.GetNamespaceOfPrefixInScope(), System.prefix, System.Xml.Linq.XNamespace.Xml, and System.Xml.Linq.XNamespace.Xmlns.

Referenced by System.Xml.Linq.XNodeReader.GetNameInAttributeScope().