public MethodBase resolve(MethodReference methodReference) { initMethods(); List <MethodBase> list; if (!methods.TryGetValue(methodReference.Name, out list)) { return(null); } var git = methodReference.DeclaringType as GenericInstanceType; var gim = methodReference as GenericInstanceMethod; methodReference = MethodReferenceInstance.make(methodReference, git, gim); foreach (var method in list) { if (ResolverUtils.compareMethods(method, methodReference)) { return(method); } } return(null); }
MethodBase resolveGlobalMethod(IMethod methodRef) { initGlobalMethods(); foreach (var globalMethod in globalMethods) { if (ResolverUtils.compareMethods(globalMethod, methodRef)) { return(globalMethod); } } return(null); }
public MethodBase resolve(IMethod methodRef) { initMethods(); List <MethodBase> list; if (!methods.TryGetValue(methodRef.Name.String, out list)) { return(null); } methodRef = GenericArgsSubstitutor.create(methodRef, methodRef.DeclaringType.TryGetGenericInstSig()); foreach (var method in list) { if (ResolverUtils.compareMethods(method, methodRef)) { return(method); } } return(null); }