private object[] GetExecuteArguments(BindingMatch match) { if (match.Arguments.Length != match.StepBinding.ParameterTypes.Length) { throw errorProvider.GetParameterCountError(match, match.Arguments.Length); } var arguments = match.Arguments.Select( (arg, argIndex) => ConvertArg(arg, match.StepBinding.ParameterTypes[argIndex])) .ToArray(); return(arguments); }
private object[] GetExecuteArguments(BindingMatch match) { var bindingParameters = match.StepBinding.Method.Parameters.ToArray(); if (match.Arguments.Length != bindingParameters.Length) { throw _errorProvider.GetParameterCountError(match, match.Arguments.Length); } var arguments = match.Arguments.Select( (arg, argIndex) => ConvertArg(arg, bindingParameters[argIndex].Type)) .ToArray(); return(arguments); }