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

◆ Write() [6/6]

void System.Xml.Schema.XmlSchema.Write ( XmlWriter writer,
XmlNamespaceManager? namespaceManager )
inline

Definition at line 498 of file XmlSchema.cs.

499 {
502 if (namespaceManager != null)
503 {
505 bool flag = false;
506 if (base.Namespaces != null)
507 {
508 flag = base.Namespaces.TryLookupPrefix("xs", out var _) || base.Namespaces.TryLookupNamespace("http://www.w3.org/2001/XMLSchema", out var _);
509 }
510 if (!flag && namespaceManager.LookupPrefix("http://www.w3.org/2001/XMLSchema") == null && namespaceManager.LookupNamespace("xs") == null)
511 {
512 xmlSerializerNamespaces.Add("xs", "http://www.w3.org/2001/XMLSchema");
513 }
514 foreach (string item in namespaceManager)
515 {
516 if (item != "xml" && item != "xmlns")
517 {
518 xmlSerializerNamespaces.Add(item, namespaceManager.LookupNamespace(item));
519 }
520 }
521 }
522 else if (base.Namespaces != null && base.Namespaces.Count > 0)
523 {
524 if (!base.Namespaces.TryLookupPrefix("xs", out var _) && !base.Namespaces.TryLookupNamespace("http://www.w3.org/2001/XMLSchema", out var _))
525 {
526 base.Namespaces.Add("xs", "http://www.w3.org/2001/XMLSchema");
527 }
528 xmlSerializerNamespaces = base.Namespaces;
529 }
530 else
531 {
533 xmlSerializerNamespaces.Add("xs", "http://www.w3.org/2001/XMLSchema");
534 if (_targetNs != null && _targetNs.Length != 0)
535 {
537 }
538 }
540 }

References System.Xml.Schema.XmlSchema._targetNs, System.Xml.Dictionary, System.item, System.Xml.XmlNamespaceManager.LookupNamespace(), System.Xml.XmlNamespaceManager.LookupPrefix(), and System.writer.