Example #1
0
        public string RenderView(IContext context)
        {
            string text = string.Empty;

            using (Stream writer = new MemoryStream())
            {
                compilationUnit.Execute(context, writer);

                writer.Position = 0;

                using (StreamReader sr = new StreamReader(writer, WebAppConfig.TemplateFileEncoding))
                {
                    text = sr.ReadToEnd();
                }
            }

            return(text);
        }