/// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="parent">The template item that contains this item.</param>
        /// <param name="name">The name of this template item.</param>
        /// <param name="lineNumber">The line number within the xml template file.</param>
        /// <param name="positionInLine">The column number within the xml template file.</param>
        /// <param name="functionName">The name of the function include parameters.</param>
        /// <param name="valueFunction">The custom function for this formula</param>
        /// <param name="parameterNames">The parameter names if the function is parameterized (otherwise null).</param>
        protected internal CustomFormulaTemplateItem(TemplateItem parent, string name, int lineNumber, int positionInLine, string functionName, Delegate valueFunction, string [] parameterNames) :
            base(parent, name, lineNumber, positionInLine)
        {
            ParameterCheck.ParameterRequired(valueFunction, "valueFunction");
            ParameterCheck.StringRequiredAndNotWhitespace(functionName, "functionName");

            this.valueFunction  = new CustomFormula(functionName, valueFunction);
            this.functionName   = functionName;
            this.parameterNames = parameterNames;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="parent">The template item that contains this item.</param>
        /// <param name="name">The name of this template item.</param>
        /// <param name="lineNumber">The line number within the xml template file.</param>
        /// <param name="positionInLine">The column number within the xml template file.</param>
        /// <param name="functionName">The name of the function include parameters.</param>
        /// <param name="valueFunction">The custom function for this formula</param>
        /// <param name="parameterNames">The parameter names if the function is parameterized (otherwise null).</param>
        protected internal CustomFormulaTemplateItem(TemplateItem parent, string name, int lineNumber, int positionInLine, string functionName, Delegate valueFunction, string [] parameterNames) :
            base(parent, name, lineNumber, positionInLine)
        {
            ParameterCheck.ParameterRequired(valueFunction, "valueFunction");
            ParameterCheck.StringRequiredAndNotWhitespace(functionName, "functionName");

            this.valueFunction = new CustomFormula(functionName, valueFunction);
            this.functionName = functionName;
            this.parameterNames = parameterNames;
        }