From 9d90396af887f6e48c934232d758e2196c9fecf3 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 31 Mar 2015 13:51:37 +0200 Subject: [PATCH] Syntax highlighting --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d03af4f..285d46d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ ## RazorMachine ### - - var rm = new RazorMachine(); - var result = - rm.Execute("Hello @Model.FirstName @Model.LastName", new {FirstName="John", LastName="Smith"}); - Console.WriteLine(result); +```csharp +var rm = new RazorMachine(); +var result = + rm.Execute("Hello @Model.FirstName @Model.LastName", new {FirstName="John", LastName="Smith"}); +Console.WriteLine(result); +``` RazorMachine is a robust and easy to use .Net Razor v2/v3 template engine. The master branch uses Razor v3. This implementation supports layouts (masterpages) and a _viewStart construct, just like MVC does support these features. The RazorEngine works independently from MVC. It only needs the System.Web.Razor reference. It almost works exacly like Asp.Net MVC. Take a look at https://github.com/jlamfers/RazorMachine/wiki/Examples to see how easily this framework works.