public GetArrayMethod ( System arrayClass, string methodName, System callingConvention, System returnType, System parameterTypes ) : System.Reflection.MethodInfo | ||
arrayClass | System | |
methodName | string | |
callingConvention | System | |
returnType | System | |
parameterTypes | System | |
리턴 | System.Reflection.MethodInfo |
private void VerificationHelper(ModuleBuilder module, Type arrayClass, string methodName, CallingConventions convention, Type returnType, Type[] parameterTypes, Type desiredException) { Assert.Throws(desiredException, () => { MethodInfo method = module.GetArrayMethod(arrayClass, methodName, convention, returnType, parameterTypes); }); }
internal MethodInfo GetArrayCreateWithLowerBoundsMethod(IArrayTypeReference arrayTypeReference, ModuleBuilder moduleBuilder) { var type = this.GetType(arrayTypeReference); var parameterTypes = new Type[arrayTypeReference.Rank*2]; for (int i = 0; i < arrayTypeReference.Rank*2; i++) parameterTypes[i] = typeof(int); return moduleBuilder.GetArrayMethod(type, ".ctor", CallingConventions.HasThis, typeof(void), parameterTypes); }
private void VerificationHelper(ModuleBuilder module, Type arrayClass, string methodName, CallingConventions convention, Type returnType, Type[] parameterTypes) { MethodInfo method = module.GetArrayMethod(arrayClass, methodName, convention, returnType, parameterTypes); Assert.True(method.DeclaringType.Equals(arrayClass)); Assert.Equal(method.Name, methodName); Assert.Equal(method.CallingConvention, convention); Assert.True(method.ReturnType.Equals(returnType)); }
internal MethodInfo GetArraySetMethod(IArrayTypeReference arrayTypeReference, ModuleBuilder moduleBuilder) { var type = this.GetType(arrayTypeReference); var parameterTypes = new Type[arrayTypeReference.Rank+1]; for (int i = 0; i < arrayTypeReference.Rank; i++) parameterTypes[i] = typeof(int); parameterTypes[arrayTypeReference.Rank] = type.GetElementType(); return moduleBuilder.GetArrayMethod(type, "Set", CallingConventions.HasThis, typeof(void), parameterTypes); }