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

◆ LookupPrefix()

override string System.Xml.XmlWellFormedWriter.LookupPrefix ( string ns)
inline

Definition at line 2241 of file XmlWellFormedWriter.cs.

2242 {
2243 try
2244 {
2245 if (ns == null)
2246 {
2247 throw new ArgumentNullException("ns");
2248 }
2249 for (int num = _nsTop; num >= 0; num--)
2250 {
2251 if (_nsStack[num].namespaceUri == ns)
2252 {
2253 string prefix = _nsStack[num].prefix;
2254 for (num++; num <= _nsTop; num++)
2255 {
2256 if (_nsStack[num].prefix == prefix)
2257 {
2258 return null;
2259 }
2260 }
2261 return prefix;
2262 }
2263 }
2264 return (_predefinedNamespaces != null) ? _predefinedNamespaces.LookupPrefix(ns) : null;
2265 }
2266 catch
2267 {
2268 _currentState = State.Error;
2269 throw;
2270 }
2271 }
readonly IXmlNamespaceResolver _predefinedNamespaces
string? LookupPrefix(string namespaceName)

References System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._nsStack, System.Xml.XmlWellFormedWriter._nsTop, System.Xml.XmlWellFormedWriter._predefinedNamespaces, System.Xml.IXmlNamespaceResolver.LookupPrefix(), System.prefix, and System.Xml.XmlWellFormedWriter.Namespace.prefix.

Referenced by System.Xml.XmlWellFormedWriter.NamespaceResolverProxy.LookupPrefix(), System.Xml.XmlWellFormedWriter.WriteQualifiedName(), System.Xml.XmlWellFormedWriter.WriteQualifiedNameAsync(), System.Xml.XmlWellFormedWriter.WriteStartAttribute(), System.Xml.XmlWellFormedWriter.WriteStartAttributeAsync_NoAdvanceState(), System.Xml.XmlWellFormedWriter.WriteStartElement(), and System.Xml.XmlWellFormedWriter.WriteStartElementAsync_NoAdvanceState().