static string ProcessTemplate(string exampleTemplateName, DynamicViewModel model)
        {
            var templateQualifiedFileName = ExampleTemplates.GetPath(exampleTemplateName);

            if (!File.Exists(templateQualifiedFileName))
            {
                throw new FileNotFoundException("File not found: " + exampleTemplateName);
            }

            // Read the text template.
            string input = File.ReadAllText(templateQualifiedFileName);

            // Eliminate Inherits="DynamicTransform" from template directive
            input = Regex.Replace(input, @"\<\#\@\s*\bTemplate\b(.*?\b)?Inherits=""DynamicTransform""\s*(.*?)\#\>", @"<#@ Template $1 $2 #>", RegexOptions.Singleline | RegexOptions.IgnoreCase);

            // Append "Model" property (all example templates are C#)
            input += ModelPropertyClassFeatures.ModelPropertySourceForLanguage["cs"];

            // Transform the text template.
            using (var host = new DynamicTextTemplatingEngineHost {
                TemplateFile = templateQualifiedFileName,
                Model = model
            }) {
                string output = new Engine().ProcessTemplate(input, host);
                if (host.Errors.HasErrors)
                {
                    throw new TemplateProcessingErrorException(host.Errors);
                }
                return(output);
            }
        }