/// <summary> /// Set the parameters for a <see cref="FunctionCall"/> /// </summary> /// <param name="functionCall"><see cref="FunctionCall"/> to set for</param> /// <param name="parameters">Parameters to set</param> /// <returns>Chained <see cref="FunctionCall"/> to keep building on</returns> public static FunctionCall WithParameters(this FunctionCall functionCall, params LanguageElement[] parameters) { functionCall.Parameters = parameters; return(functionCall); }
/// <summary> /// Specify a name for the <see cref="FunctionCall"/> /// </summary> /// <param name="functionCall"><see cref="FunctionCall"/> to set name for</param> /// <param name="name">Name of the <see cref="FunctionCall"/></param> /// <returns>Chained <see cref="FunctionCall"/> to keep building on</returns> public static FunctionCall WithName(this FunctionCall functionCall, string name) { functionCall.Function = name; return(functionCall); }
/// <summary> /// Set the parameters for a <see cref="FunctionCall"/> based on strings /// </summary> /// <param name="functionCall"><see cref="FunctionCall"/> to set for</param> /// <param name="parameters">Parameters to set</param> /// <returns>Chained <see cref="FunctionCall"/> to keep building on</returns> public static FunctionCall WithParameters(this FunctionCall functionCall, params string[] parameters) { functionCall.Parameters = parameters.Select(p => new Literal(p)).ToArray(); return(functionCall); }