ServiceStack/ServiceStack — pull request #203 by jrosskopf (2012-07-31 12:17:16+00:00)
Title: VirtualPath provider for RazorFormat

To not tightly bind the RazorFormat-impl to a specific way/layout the templates are stored, I added a simple virutal-path abstraction. Performance impact is low, as template discovery is only done on startup.

In Razor-Project the following was done:
* Adding virtual-path functionality, main interface IVirtualPathProvider
* Adding IVirtualPathProvider impl: FileSystemVirtualPathProvider
* Adding IVirtualPathProvider impl: ResourceVirtualPathProvider
* Adding IVirtualPathProvider impl: MultiVirtualPathProvider
* Refactoring RazorFormat to use IVirtualPathProvider

Beside that the following changes had been made to the test project
* Change RazorHostTest to use VirtualPathProvider
* Add embedded resources to test ResourceVirtualPathProvider

Not sure, if inside the Razor-project is the right place for virtual path. Eg. it's may be interesting to also rewrite static files (StaticFileHandler).

Regards
---
Joachim