RazorEngine
RazorEngine copied to clipboard
Streming the output of a template
There are cases where you might have to generate a big output. I hit one where RazorEngine throws because of an OutOfMemoryException from StringBuilder. But the output could be actually sent to a stream, and you would not care of buffering it all. Actually TemplateBase already uses a TextWriter, but there is no way (I guess) to skip theStringBuilder and pass a TextWriter from outside, which could be built on top of a stream like Response.OutputStream.
Don't you think it would make sense to add such an option?
Thanks!
:+1:
This will be available in the next release.