These are chat archives for Antaris/RazorEngine

Jun 2015
Vincent Baaij
Jun 18 2015 08:46 UTC
I was looking around for the difference between 3.7.0 and 4.2.0. Can't find it. Does anyone have a link to more info. tia
Jun 18 2015 12:03 UTC
Hello. I would like to convert my Razor templates (e. g., in ASP.NET MVC) to JavaScript template functions. For that purpose, I suppose that one should analyze ParserResults which is being returned by ParseTemplate method. Here I am confused by the message saying "This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.". This message goes with all methods and classes necessary for the syntax tree analysis. Therefore I have a question: is there a better way to achive the declared target (to make JS of a Razor) or, if not, why does not RazorEngine freely expose techniques for the syntax tree analysis?
Matthias Dittrich
Jun 18 2015 12:04 UTC
@vnbaaij The only difference is that one is build against Razor4 (4.X) and one against Razor3 and Razor2 (3.X).
Matthias Dittrich
Jun 18 2015 21:23 UTC
@hoborg91 Sorry but its not very clear for me what you are trying to achieve. But you may be mixing up (Microsoft.AspNet.)Razor and RazorEngine. Razor handles the Razor-Template to C# code transformation and RazorEngine handles the rest: C# -> Assembly compilation and loading. IIRC ParserResult is a CodeDom generated C# code for Razor2/3 and some Razor specific stuff in Razor4. So one reason we cannot expose it is because there is no unified way to expose it (RazorEngine "sees" only the C# code as a whole). Can you please give an example of what you want to do?