RazorEngine icon indicating copy to clipboard operation
RazorEngine copied to clipboard

Streming the output of a template

Open wasphub opened this issue 12 years ago • 2 comments

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!

wasphub avatar Apr 10 '14 16:04 wasphub

:+1:

GeorgeTsiokos avatar Aug 06 '14 13:08 GeorgeTsiokos

This will be available in the next release.

matthid avatar Dec 19 '14 15:12 matthid