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

◆ Add() [1/2]

void System.Xml.Linq.XContainer.Add ( object? content)
inlineinherited

Definition at line 483 of file XContainer.cs.

484 {
485 if (SkipNotify())
486 {
488 }
489 else
490 {
491 if (content == null)
492 {
493 return;
494 }
495 if (content is XNode n)
496 {
497 AddNode(n);
498 return;
499 }
500 if (content is string s)
501 {
502 AddString(s);
503 return;
504 }
505 if (content is XAttribute a)
506 {
508 return;
509 }
510 if (content is XStreamingElement other)
511 {
512 AddNode(new XElement(other));
513 return;
514 }
515 if (content is object[] array)
516 {
517 object[] array2 = array;
518 foreach (object obj in array2)
519 {
520 Add(obj);
521 }
522 return;
523 }
524 if (content is IEnumerable enumerable)
525 {
526 {
527 foreach (object item in enumerable)
528 {
529 Add(item);
530 }
531 return;
532 }
533 }
535 }
536 }
void AddContentSkipNotify(object content)
virtual void AddAttribute(XAttribute a)
static string GetStringValue(object value)

References System.Xml.Linq.Add, System.Xml.Linq.XContainer.AddAttribute(), System.Xml.Linq.XContainer.AddContentSkipNotify(), System.Xml.Linq.XContainer.AddNode(), System.Xml.Linq.XContainer.AddString(), System.array, System.Xml.Linq.XContainer.content, System.Xml.Linq.XContainer.GetStringValue(), System.item, System.obj, System.other, System.s, and System.Xml.Linq.XObject.SkipNotify().

Referenced by System.Xml.Linq.XNodeBuilder.AddNode(), System.Xml.Linq.XNodeBuilder.AddString(), System.Xml.Linq.XNodeBuilder.Close(), System.Xml.Schema.XNodeValidator.ValidateAttributes(), and System.Xml.Linq.XNodeBuilder.WriteEndAttribute().