GetParameterCount() private method

private GetParameterCount ( ) : int
return int
Beispiel #1
0
 public override ParameterInfo[] GetParameters()
 {
     ParameterInfo[] parameters = new ParameterInfo[signature.GetParameterCount()];
     for (int i = 0; i < parameters.Length; i++)
     {
         parameters[i] = new ParameterInfoImpl(this, i);
     }
     return(parameters);
 }
Beispiel #2
0
        private static IList <CustomAttributeTypedArgument> ReadConstructorArguments(Assembly asm, ByteReader br, ConstructorInfo constructor)
        {
            MethodSignature sig   = constructor.MethodSignature;
            int             count = sig.GetParameterCount();
            List <CustomAttributeTypedArgument> list = new List <CustomAttributeTypedArgument>(count);

            for (int i = 0; i < count; i++)
            {
                list.Add(ReadFixedArg(asm, br, sig.GetParameterType(i)));
            }
            return(list.AsReadOnly());
        }
Beispiel #3
0
 private static int MatchSignatures(MethodSignature sig1, MethodSignature sig2, Type[] types)
 {
     for (int i = 0; i < sig1.GetParameterCount(); i++)
     {
         Type type1 = sig1.GetParameterType(i);
         Type type2 = sig2.GetParameterType(i);
         if (type1 != type2)
         {
             return(MatchTypes(type1, type2, types[i]));
         }
     }
     return(0);
 }
Beispiel #4
0
        private static int MatchSignatures(MethodBase mb1, MethodBase mb2, Type[] types)
        {
            MethodSignature sig1 = mb1.MethodSignature;
            MethodSignature sig2 = mb2.MethodSignature;
            IGenericBinder  gb1  = mb1 as IGenericBinder ?? mb1.DeclaringType;
            IGenericBinder  gb2  = mb2 as IGenericBinder ?? mb2.DeclaringType;

            for (int i = 0; i < sig1.GetParameterCount(); i++)
            {
                Type type1 = sig1.GetParameterType(gb1, i);
                Type type2 = sig2.GetParameterType(gb2, i);
                if (type1 != type2)
                {
                    return(MatchTypes(type1, type2, types[i]));
                }
            }
            return(0);
        }
		private static int MatchSignatures(MethodSignature sig1, MethodSignature sig2, Type[] types)
		{
			for (int i = 0; i < sig1.GetParameterCount(); i++)
			{
				Type type1 = sig1.GetParameterType(i);
				Type type2 = sig2.GetParameterType(i);
				if (type1 != type2)
				{
					return MatchTypes(type1, type2, types[i]);
				}
			}
			return 0;
		}