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

◆ AddConformanceWrapper()

XmlWriter System.Xml.XmlWriterSettings.AddConformanceWrapper ( XmlWriter baseWriter)
inlineprivate

Definition at line 580 of file XmlWriterSettings.cs.

581 {
582 ConformanceLevel conformanceLevel = ConformanceLevel.Auto;
583 XmlWriterSettings settings = baseWriter.Settings;
584 bool flag = false;
585 bool checkNames = false;
586 bool flag2 = false;
587 bool flag3 = false;
588 if (settings == null)
589 {
590 if (_newLineHandling == NewLineHandling.Replace)
591 {
592 flag2 = true;
593 flag3 = true;
594 }
596 {
597 flag = true;
598 flag3 = true;
599 }
600 }
601 else
602 {
603 if (_conformanceLevel != settings.ConformanceLevel)
604 {
606 flag3 = true;
607 }
608 if (_checkCharacters && !settings.CheckCharacters)
609 {
610 flag = true;
611 checkNames = conformanceLevel == ConformanceLevel.Auto;
612 flag3 = true;
613 }
614 if (_newLineHandling == NewLineHandling.Replace && settings.NewLineHandling == NewLineHandling.None)
615 {
616 flag2 = true;
617 flag3 = true;
618 }
619 }
620 XmlWriter xmlWriter = baseWriter;
621 if (flag3)
622 {
623 if (conformanceLevel != 0)
624 {
625 xmlWriter = new XmlWellFormedWriter(xmlWriter, this);
626 }
627 if (flag || flag2)
628 {
629 xmlWriter = new XmlCharCheckingWriter(xmlWriter, flag, checkNames, flag2, NewLineChars);
630 }
631 }
632 if (IsQuerySpecific && (settings == null || !settings.IsQuerySpecific))
633 {
634 xmlWriter = new QueryOutputWriterV1(xmlWriter, this);
635 }
636 return xmlWriter;
637 }

References System.Xml.XmlWriterSettings._checkCharacters, System.Xml.XmlWriterSettings._conformanceLevel, System.Xml.XmlWriterSettings._newLineHandling, System.Xml.XmlWriterSettings.CheckCharacters, System.Xml.XmlWriterSettings.ConformanceLevel, System.Xml.Dictionary, System.Xml.XmlWriterSettings.IsQuerySpecific, System.Xml.XmlWriterSettings.NewLineChars, and System.Xml.XmlWriterSettings.NewLineHandling.

Referenced by System.Xml.XmlWriterSettings.CreateWriter().