These are chat archives for Antaris/RazorEngine

5th
Sep 2015
Matthias Dittrich
@matthid
Sep 05 2015 09:27
@h3xstream No, currently there is no easy way. The generated code depends on RazorEngine so it might not be as useful as you might assume... What do you mean by "blocks"?
Philippe Arteau
@h3xstream
Sep 05 2015 14:21
@matthid I meant nodes of the template. HTML, code and possibly code instructions.
(But are not exposed publicly)
Matthias Dittrich
@matthid
Sep 05 2015 15:04
You might want to use Razor directly (without RazorEngine), we might provide API in the future to get the source code (and transform it with Roslyn), but never such a visitor API... The reason is quite simple: First we at RazorEngine try to abstract away the concrete Razor version for you. And secondly Razor 4 is changing dramatically and maintaining such an API is an additional headache...
You can however look into the RazorEngine source code to get an idea how to use the Razor classes (see DirectCompilerServiceBase for example)