Esempio n. 1
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;
		}
Esempio n. 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);
        }