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

◆ AddAnnotation()

void System.Xml.Linq.XObject.AddAnnotation ( object annotation)
inlineinherited

Definition at line 133 of file XObject.cs.

134 {
135 if (annotation == null)
136 {
137 throw new ArgumentNullException("annotation");
138 }
139 if (annotations == null)
140 {
141 annotations = ((!(annotation is object[])) ? annotation : new object[1] { annotation });
142 return;
143 }
144 object[] array = annotations as object[];
145 if (array == null)
146 {
147 annotations = new object[2] { annotations, annotation };
148 return;
149 }
150 int i;
151 for (i = 0; i < array.Length && array[i] != null; i++)
152 {
153 }
154 if (i == array.Length)
155 {
156 Array.Resize(ref array, i * 2);
158 }
159 array[i] = annotation;
160 }

References System.Xml.Linq.XObject.annotations, System.array, and System.Xml.Dictionary.

Referenced by System.Xml.Linq.XObject.SetBaseUri(), System.Xml.Linq.XElement.SetEndElementLineInfo(), and System.Xml.Linq.XObject.SetLineInfo().