public static MethodMap PrepareInvoke( Type type, string[] paramNames, Type[] parameterTypes,
		                                       object[] sampleParamValues )
		{
            SourceInfo sourceInfo = new SourceInfo(type, paramNames, parameterTypes);
			int hash = sourceInfo.GetHashCode();
			MethodMap map = mapCache.Get( hash );
			if( map == null )
			{
                map = DetermineBestConstructorMatch(type, paramNames, parameterTypes, sampleParamValues);
				mapCache.Insert( hash, map );
			}
			return map;
		}
Example #2
0
        public static MethodMap PrepareInvoke(Type type, string[] paramNames, Type[] parameterTypes,
                                              object[] sampleParamValues)
        {
            SourceInfo sourceInfo = new SourceInfo(type, paramNames, parameterTypes);
            int        hash       = sourceInfo.GetHashCode();
            MethodMap  map        = mapCache.Get(hash);

            if (map == null)
            {
                map = DetermineBestConstructorMatch(type, paramNames, parameterTypes, sampleParamValues);
                mapCache.Insert(hash, map);
            }
            return(map);
        }