Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.14k stars 577 forks source link

Add "true" In-Memory processing with Roslyn. #259

Open danielwertheim opened 9 years ago

danielwertheim commented 9 years ago

Is there a way to have it generate compiled template in memory instead of on disk as temporary files?

matthid commented 9 years ago

There is https://github.com/Antaris/RazorEngine#temporary-files (see bottom with config.DisableTempFileLocking = true), since 3.6.4. If you don't want to write to the disk at all, there is currently no way as long as CodeDOM is used, it should be quite easy to patch the Roslyn extension (RazorEngine.Roslyn) to write nothing to the disk though. Is config.DisableTempFileLocking = true good enough for your needs and if not why you cannot write to the disk at all?