These are chat archives for Antaris/RazorEngine

4th
Nov 2015
Matthias Dittrich
@matthid
Nov 04 2015 09:34
@mpbill Only the example code/docs and real life open-source applications using RazorEngine, but I don't know any demo applications right now
mpbill
@mpbill
Nov 04 2015 16:35
I dont understand ITemplateKeys. how can I construct a template key when each template key requires another 'context' template key?
BaseTemplateKey tk = new NameOnlyTemplateKey("page", ResolveType.Include, new NameOnlyTemplateKey(null, ResolveType.Include, new NameOnlyTemplateKey()));
etc
mpbill
@mpbill
Nov 04 2015 17:23
So far the only way I can understand how to use a template is to read the *.cshtml file with a TextReader and pass that into Engine.Razor.RunCompile(). I feel there has to be a cleaner way of doing this, especially with all the classes I am seeing like TemplateManager, CachingProvider, TemplateKey etc... I just cant seem to find a good example of how to use one or all of these to automatically parse a template which i have created in my project. any help would be much appreciated!