razorengine

    3熱度

    2回答

    當在Razor ViewEngine中調用Parse方法時,會出現編譯錯誤,如TemplateComplilationException,其中包含錯誤列表。這些錯誤引用了臨時文件名,但是在訪問它們之前文件被刪除。 static void Main(string[] args) { var service = TemplateServiceFactory.CreateTemplateSe

    3熱度

    1回答

    我需要編寫一個需要注入構造函數參數的自定義基本模板。 For RazorEngine v2 this ilustrates非常清晰如何做。 自定義基本模板DI應該在v3中完成?我的意思是仍然有一種方法可以通過Func <>來表示激活器?

    3熱度

    2回答

    是否可以在webforms web應用程序中使用Razor引擎(razorengine.codeplex.com)?我正在使用文件來定義模板,例如 Sample.cshtml <h1>Hello</h1> 或者sample2.cshtml(與繼承,使智能感知) @inherits SomeBaseClass<SomeModelClass> <h1>Hello @Model.SomePrope

    4熱度

    2回答

    我在非MVC環境中使用Razor引擎(razorengine.codeplex.com)。我編譯存儲在文件中的模板,並使用@inherits來提供智能感知支持。 RazorEngine大會 自定義組件 - 引用RazorEngine,包含View<>並將View<>作爲基類 Web應用程序 - 引用RazorEngine,自定義程序集,包含.cshtml模板文件 所有CSHTML文件有以下指令@i

    1熱度

    1回答

    例外,我的模板看起來是這樣的: @using RazorEngine; @model System.String @{ var content = @"<div id=""text-block-container""> @Html.Raw(""<h1>test</h2>"") </div>"; Razor.SetTemplateBase(typeof

    0熱度

    1回答

    我試圖使用RazorEngine在WPF應用程序中生成FlowDocument。 包括,使用,RazorEngine在應用程序看起來工作正常,但只要我嘗試在testproject使用它,我得到以下異常: System.Security.VerificationException: Operation could destabilize the runtime. 堆棧跟蹤: System.Web