protected virtual bool CheckVarArgsParameter(IParameter[] parameters, ExpressionCollection args)
{
int lastIndex = parameters.Length - 1;
Node lastArg = args[-1];
if (AstUtil.IsExplodeExpression(lastArg))
{
return CalculateArgumentScore(parameters[lastIndex], parameters[lastIndex].Type, lastArg) > 0;
}
IType varArgType = parameters[lastIndex].Type.GetElementType();
for (int i = lastIndex; i < args.Count; ++i)
{
int argumentScore = CalculateArgumentScore(parameters[lastIndex], varArgType, args[i]);
if (argumentScore < 0) return false;
}
return true;
}