/// <summary>
        /// executes the template and writes output to the response
        /// caller is required to open and close the output stream
        /// </summary>
        /// <param name="response">the output stream to write to</param>
        public void Execute(MyStreamWriter response, TemplateParameters parameters)
        {
            if (Result == null)
            {
                return;
            }

            if (Result.Errors.HasErrors)
            {
                foreach (System.CodeDom.Compiler.CompilerError error in Result.Errors)
                {
                    response.Write(GenerateSource());
                    response.Write(String.Format("Error on line {0}: {1}", error.Line, error.ErrorText));
                }
                return;
            }

            if (Sections == null)
            {
                return;                   // nothing to execute
            }
            Sections.Process(Result.CompiledAssembly, parameters, response);
        }