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

◆ Annotation()

object? System.Xml.Linq.XObject.Annotation ( Type type)
inlineinherited

Definition at line 162 of file XObject.cs.

163 {
164 if (type == null)
165 {
166 throw new ArgumentNullException("type");
167 }
168 if (annotations != null)
169 {
170 if (!(annotations is object[] array))
171 {
172 if (XHelper.IsInstanceOfType(annotations, type))
173 {
174 return annotations;
175 }
176 }
177 else
178 {
179 foreach (object obj in array)
180 {
181 if (obj == null)
182 {
183 break;
184 }
185 if (XHelper.IsInstanceOfType(obj, type))
186 {
187 return obj;
188 }
189 }
190 }
191 }
192 return null;
193 }

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