private static MethodInfo GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { MethodInfo result = null; var key = new TypeMethodInfoPair { Type = type, MethodInfo = method }; if (!methodCache.TryGetValue(key, out result)) { result = FindMethodOnTypeThatWillBeInvokedByMethodInfo(type, method); methodCache.Add(key, result); } return(result); }
public virtual MethodInfo GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { MethodInfo result = null; var key = new TypeMethodInfoPair { Type = type, MethodInfo = method }; lock (MethodCache) { if (!MethodCache.TryGetValue(key, out result)) { result = FindMethodOnTypeThatWillBeInvokedByMethodInfo(type, method); MethodCache.Add(key, result); } } return result; }
public virtual MethodInfo GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { MethodInfo result = null; var key = new TypeMethodInfoPair { Type = type, MethodInfo = method }; lock (MethodCache) { if (!MethodCache.TryGetValue(key, out result)) { result = FindMethodOnTypeThatWillBeInvokedByMethodInfo(type, method); MethodCache.Add(key, result); } } return(result); }
public virtual MethodInfo GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { var key = new TypeMethodInfoPair(type, method); return MethodCache.GetOrAdd(key, k => FindMethodOnTypeThatWillBeInvokedByMethodInfo(k.Type, k.MethodInfo)); }
public virtual MethodInfo?GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { var key = new TypeMethodInfoPair(type, method); return(MethodCache.GetOrAdd(key, k => FindMethodOnTypeThatWillBeInvokedByMethodInfo(k.Type, new FakeItEasy.Compatibility.MethodInfoWrapper(k.MethodInfo, k.Type)))); }
public virtual MethodInfo GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { var key = new TypeMethodInfoPair(type, method); return(MethodCache.GetOrAdd(key, k => FindMethodOnTypeThatWillBeInvokedByMethodInfo(k.Type, k.MethodInfo))); }
public virtual MethodInfo GetMethodOnTypeThatWillBeInvokedByMethodInfo(Type type, MethodInfo method) { var key = new TypeMethodInfoPair(type, method); return MethodCache.GetOrAdd(key, k => FindMethodOnTypeThatWillBeInvokedByMethodInfo(k.Type, new FakeItEasy.Compatibility.MethodInfoWrapper(k.MethodInfo, k.Type))); }