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

◆ FindTypes()

virtual Type[] System.Reflection.Module.FindTypes ( TypeFilter? filter,
object? filterCriteria )
inlinevirtualinherited

Definition at line 215 of file Module.cs.

216 {
217 Type[] types = GetTypes();
218 int num = 0;
219 for (int i = 0; i < types.Length; i++)
220 {
221 if (filter != null && !filter(types[i], filterCriteria))
222 {
223 types[i] = null;
224 }
225 else
226 {
227 num++;
228 }
229 }
230 if (num == types.Length)
231 {
232 return types;
233 }
234 Type[] array = new Type[num];
235 num = 0;
236 for (int j = 0; j < types.Length; j++)
237 {
238 if (types[j] != null)
239 {
240 array[num++] = types[j];
241 }
242 }
243 return array;
244 }
virtual Type[] GetTypes()
Definition Module.cs:191

References System.array, System.Runtime.Serialization.Dictionary, and System.Reflection.Module.GetTypes().