private bool TryGetClrMember(string/*!*/ name, bool virtualLookup, out RubyMemberInfo method) {
// Skip hidden CLR overloads.
// Skip lookup on types that are not visible, that are interfaces or generic type definitions.
if (_typeTracker != null && !IsModuleType(_typeTracker.Type)) {
// Note: Do not allow mangling for CLR virtual lookups - we want to match the overridden name exactly as is,
// so that it corresponds to the base method call the override stub performs.
bool mapNames = (Restrictions & ModuleRestrictions.NoNameMapping) == 0;
bool unmangleNames = !virtualLookup && mapNames;
if (TryGetClrMember(_typeTracker.Type, name, mapNames, unmangleNames, out method)) {
_methods.Add(name, method);
return true;
}
}
method = null;
return false;
}