8using System.Collections.Generic;
13 internal static class DataPortalMethodCache
15 private static Dictionary<MethodCacheKey, DataPortalMethodInfo> _cache =
16 new Dictionary<MethodCacheKey, DataPortalMethodInfo>();
18 public static DataPortalMethodInfo GetMethodInfo(Type objectType,
string methodName, params
object[] parameters)
20 var key =
new MethodCacheKey(objectType.FullName, methodName, MethodCaller.GetParameterTypes(parameters));
21 DataPortalMethodInfo result =
null;
25 found = _cache.TryGetValue(key, out result);
33 if (!_cache.TryGetValue(key, out result))
35 result =
new DataPortalMethodInfo(MethodCaller.GetMethod(objectType, methodName, parameters));
36 _cache.Add(key, result);