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

◆ FindMethod() [2/2]

static ? MethodInfo System.ComponentModel.MemberDescriptor.FindMethod ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type componentClass,
string name,
Type[] args,
Type returnType,
bool publicOnly )
inlinestaticprotectedinherited

Definition at line 308 of file MemberDescriptor.cs.

309 {
310 if (componentClass == null)
311 {
312 throw new ArgumentNullException("componentClass");
313 }
314 MethodInfo methodInfo = null;
315 methodInfo = ((!publicOnly) ? componentClass.GetMethod(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, args, null) : componentClass.GetMethod(name, args));
316 if (methodInfo != null && !methodInfo.ReturnType.IsEquivalentTo(returnType))
317 {
318 methodInfo = null;
319 }
320 return methodInfo;
321 }