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

◆ TryGetKey()

bool System.Xml.XmlBinaryNodeWriter.TryGetKey ( XmlDictionaryString s,
out int key )
inlineprivate

Definition at line 413 of file XmlBinaryNodeWriter.cs.

414 {
415 key = -1;
416 if (s.Dictionary == _dictionary)
417 {
418 key = s.Key * 2;
419 return true;
420 }
421 if (_dictionary != null && _dictionary.TryLookup(s, out XmlDictionaryString result))
422 {
423 key = result.Key * 2;
424 return true;
425 }
426 if (_session == null)
427 {
428 return false;
429 }
431 {
432 return false;
433 }
434 key = key2 * 2 + 1;
435 return true;
436 }
bool TryLookup(XmlDictionaryString s, out int key)
virtual bool TryAdd(XmlDictionaryString value, out int key)
bool TryLookup(string value, [NotNullWhen(true)] out XmlDictionaryString? result)

References System.Xml.XmlBinaryNodeWriter._dictionary, System.Xml.XmlBinaryNodeWriter._session, System.Xml.Dictionary, System.key, System.s, System.Xml.XmlBinaryWriterSession.TryAdd(), System.Xml.IXmlDictionary.TryLookup(), and System.Xml.XmlBinaryWriterSession.TryLookup().

Referenced by System.Xml.XmlBinaryNodeWriter.WriteQualifiedName(), System.Xml.XmlBinaryNodeWriter.WriteStartAttribute(), System.Xml.XmlBinaryNodeWriter.WriteStartElement(), System.Xml.XmlBinaryNodeWriter.WriteText(), and System.Xml.XmlBinaryNodeWriter.WriteXmlnsAttribute().