Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public bool Equals(NameAndType other)
 {
     return(Type == other.Type && string.Equals(Name, other.Name));
 }