public CallMethodILCode(ILCodeParameter instance, MethodInfo method, params ILCodeParameter[] parameters) { if (instance == null && !method.IsStatic) throw new ArgumentException("Instance must be provided for instance methods"); if (instance != null && method.IsStatic) throw new ArgumentException("Static method may not be invoked with an instance"); _methodParameters = method.GetParameters(); if (_methodParameters.Length < parameters.Length) throw new ArgumentException("The parameter length supplied is greater than the method supports"); _instance = instance; _method = method; _parameters = parameters; _returnType = method.ReturnType; }
public NullableILCodeParameter(IILCodeParameter parameter) { if (parameter.ParameterType == null) throw new NotSupportedException("The parameter does not have a well defined parameter type"); _parameter = parameter; }
public CastILCodeParameter(IILCodeParameter parameter, Type toType) { _parameter = parameter; _toType = toType; }