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

◆ AddString()

void System.Xml.Linq.XContainer.AddString ( string s)
inlinepackageinherited

Definition at line 791 of file XContainer.cs.

792 {
794 if (content == null)
795 {
796 if (s.Length > 0)
797 {
798 AppendNode(new XText(s));
799 }
800 else if (this is XElement)
801 {
802 NotifyChanging(this, XObjectChangeEventArgs.Value);
803 if (content != null)
804 {
806 }
807 content = s;
808 NotifyChanged(this, XObjectChangeEventArgs.Value);
809 }
810 else
811 {
812 content = s;
813 }
814 }
815 else if (s.Length > 0)
816 {
818 if (content is XText xText && !(xText is XCData))
819 {
820 xText.Value += s;
821 }
822 else
823 {
824 AppendNode(new XText(s));
825 }
826 }
827 }
static string InvalidOperation_ExternalCode
Definition SR.cs:50
Definition SR.cs:7
virtual void ValidateString(string s)
bool NotifyChanging(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:428
bool NotifyChanged(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:399

References System.Xml.Linq.XContainer.AppendNode(), System.Xml.Linq.XContainer.content, System.Xml.Linq.XContainer.ConvertTextToNode(), System.Xml.Dictionary, System.SR.InvalidOperation_ExternalCode, System.Xml.Linq.XObject.NotifyChanged(), System.Xml.Linq.XObject.NotifyChanging(), System.s, System.Xml.Linq.XContainer.ValidateString(), and System.Xml.Linq.XObjectChangeEventArgs.Value.

Referenced by System.Xml.Linq.XContainer.Add().