Ejemplo n.º 1
0
        public string FillTemplate(ConfigValuesFile values)
        {
            string result = _templateText;
            foreach (KeyValuePair<string, string> kvp in values)
            {
                result = result.Replace("%" + kvp.Key + "%", kvp.Value);
            }

            return result;
        }
Ejemplo n.º 2
0
        private ConfigValuesFile SetupValues()
        {
            ConfigValuesFile cv = new ConfigValuesFile(_valueFilePath);

            //also add values pushed to us
            foreach (KeyValuePair<string, string> val in _extraValues)
            {
                cv.Add(val.Key, val.Value);
            }

            //validate that there arent any {REQUIRE} values undefined
            cv.Validate();

            return cv;
        }