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

◆ RemoveAnnotations()

void System.Xml.Linq.XObject.RemoveAnnotations ( Type type)
inlineinherited

Definition at line 312 of file XObject.cs.

313 {
314 if (type == null)
315 {
316 throw new ArgumentNullException("type");
317 }
318 if (annotations == null)
319 {
320 return;
321 }
322 if (!(annotations is object[] array))
323 {
324 if (XHelper.IsInstanceOfType(annotations, type))
325 {
326 annotations = null;
327 }
328 return;
329 }
330 int i = 0;
331 int num = 0;
332 for (; i < array.Length; i++)
333 {
334 object obj = array[i];
335 if (obj == null)
336 {
337 break;
338 }
339 if (!XHelper.IsInstanceOfType(obj, type))
340 {
341 array[num++] = obj;
342 }
343 }
344 if (num == 0)
345 {
346 annotations = null;
347 return;
348 }
349 while (num < i)
350 {
351 array[num++] = null;
352 }
353 }

References System.Xml.Linq.XObject.annotations, System.array, System.Xml.Linq.XHelper.IsInstanceOfType(), System.obj, and System.type.