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

◆ Annotations< T >()

Type Constraints
T :class 

Definition at line 284 of file XObject.cs.

284 : class
285 {
286 if (annotations == null)
287 {
288 yield break;
289 }
290 if (!(annotations is object[] a))
291 {
292 if (annotations is T val)
293 {
294 yield return val;
295 }
296 yield break;
297 }
298 foreach (object obj in a)
299 {
300 if (obj != null)
301 {
302 if (obj is T val2)
303 {
304 yield return val2;
305 }
306 continue;
307 }
308 break;
309 }
310 }

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