public static bool IsApplicable(ScriptingContext context, TargetFunctionType method,
TargetType[] types, out string error)
{
TargetMethodSignature sig = method.GetSignature (context.CurrentThread);
for (int i = 0; i < types.Length; i++) {
TargetType param_type = sig.ParameterTypes [i];
if (param_type == types [i])
continue;
if (Convert.ImplicitConversionExists (context, types [i], param_type))
continue;
error = String.Format (
"Argument {0}: Cannot implicitly convert `{1}' to `{2}'",
i, types [i].Name, param_type.Name);
return false;
}
error = null;
return true;
}