Esempio n. 1
0
        internal PcParameter(ParametricComposer parentTemplate, string parameterName)
        {
            ParentTemplate = parentTemplate;

            ParameterName = parameterName;

            ParameterValue = String.Empty;
        }
Esempio n. 2
0
        /// <summary>
        /// Generate the given template text from the supplied parameters values
        /// </summary>
        /// <param name="composer"></param>
        /// <param name="paramsValues"></param>
        /// <returns></returns>
        public static string GenerateText(this ParametricComposer composer, IParametericComposerValueSource paramsValues)
        {
            composer.SetParametersValues(paramsValues);

            return(composer.GenerateText());
        }
Esempio n. 3
0
        /// <summary>
        /// Generate the given template text from the supplied parameters values
        /// </summary>
        /// <param name="composer"></param>
        /// <param name="paramsValues"></param>
        /// <returns></returns>
        public static string GenerateText(this ParametricComposer composer, IDictionary <string, string> paramsValues)
        {
            composer.SetParametersValues(paramsValues);

            return(composer.GenerateText());
        }
Esempio n. 4
0
        /// <summary>
        /// Generate the given template text from the supplied parameters values
        /// </summary>
        /// <param name="composer"></param>
        /// <param name="paramsValues"></param>
        /// <returns></returns>
        public static string GenerateText(this ParametricComposer composer, params object[] paramsValues)
        {
            composer.SetParametersValues(paramsValues);

            return(composer.GenerateText());
        }
Esempio n. 5
0
        /// <summary>
        /// Generate text from the given template text and template parameters values. The values are assigned
        /// to parameters in the order the parameter appears in the template text
        /// </summary>
        /// <param name="leftDelimiter"></param>
        /// <param name="rightDelimiter"></param>
        /// <param name="templateText"></param>
        /// <param name="values"></param>
        /// <returns></returns>
        public static string GenerateFrom(string leftDelimiter, string rightDelimiter, string templateText, params string[] values)
        {
            var template = new ParametricComposer(leftDelimiter, rightDelimiter, templateText);

            return(template.GenerateUsing(values));
        }