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

◆ TryLookupPrefix()

bool System.Xml.Serialization.XmlSerializerNamespaces.TryLookupPrefix ( string ns,
out string prefix )
inlinepackage

Definition at line 105 of file XmlSerializerNamespaces.cs.

106 {
107 prefix = null;
108 if (_namespaces == null || _namespaces.Count == 0 || string.IsNullOrEmpty(ns))
109 {
110 return false;
111 }
113 {
114 if (!string.IsNullOrEmpty(@namespace.Key) && @namespace.Value.Namespace == ns)
115 {
116 prefix = @namespace.Key;
117 return true;
118 }
119 }
120 return false;
121 }
Dictionary< string, XmlQualifiedName > _namespaces

References System.Xml.Serialization.XmlSerializerNamespaces._namespaces, System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.prefix.

Referenced by System.Xml.Serialization.XmlSerializationWriter.WriteStartElement().