开源 模板引擎基于 Microsoft 的 Razor 分析引擎。线程安全。允许在 ASP.Net MVC 项目之外运行 Razor 模板。
开源 模板引擎基于 Microsoft 的 Razor 分析引擎。线程安全。允许在 ASP.Net MVC 项目之外运行 Razor 模板。
Open source templating engine based on Microsoft's Razor parsing engine. Thread safe. Allows to run Razor templates outside of ASP.NET projects.
To install RazorTemplates, run the following command in the Package Manager Console:
PM> Install-Package RazorTemplatesUsing the library is as simple as two lines of code:
using RazorTemplates.Core;
var template = Template.Compile("Hello @Model.Name!");
Console.WriteLine(template.Render(new { Name = "World" }));You can extend templates by including required namespaces:
…暂无开放 Issues,或尚未同步最近议题。