public MethodInfo GetOrCacheMethodForTypeAndName(Type type, string name, StringComparison comparison = StringComparison.OrdinalIgnoreCase) { // type(name)->method var key = new NameAndType(name, type); if (!_methods.TryGetValue(key, out var method)) { _methods[key] = method = type.GetWidestMethod(name, comparison); } return(method); }
public bool Equals(NameAndType other) { return(Type == other.Type && string.Equals(Name, other.Name)); }