Adding a suffix to generated class names

Feb 19, 2014 at 2:37 PM

I use RazorGenerator.MsBuild to precompile MVC views. I wonder if it is possible to add suffix to generated class names. When I have a view 'Invoice.cshtml' and a model 'Invoice' it won't compile, becase the generated class looks like this:
public partial class Invoice : Hypos.CRM.ViewPage<Invoice>
Can I change class name to InvoiceViewPage or something similar?

Thank you!

Feb 19, 2014 at 5:38 PM
You could stick a directive at the top of the file to do this:
// MyView.cshtml
@* ClassSuffix: Foo *@
If you want to do this for all files in the folder, you could write a file named "razorgenerator.directives" with the directive:
ClassSuffix: Foo
Some of the other supported directives are specified on the project home page -
Marked as answer by djanosik on 2/19/2014 at 11:59 AM
Feb 19, 2014 at 6:58 PM
Ok, thank you!