using System.Web.Razor; using System.Web.Razor.Generator; namespace ServiceStack.Razor.Compilation.CSharp { public class CSharpRazorCodeLanguage : System.Web.Razor.CSharpRazorCodeLanguage { /// /// Initialises a new instance /// /// Flag to determine whether strict mode is enabled. public CSharpRazorCodeLanguage(bool strictMode) { StrictMode = strictMode; } /// /// Gets whether strict mode is enabled. /// public bool StrictMode { get; private set; } /// /// Creates the code generator. /// /// Name of the class. /// Name of the root namespace. /// Name of the source file. /// The host. /// An instance of . public override RazorCodeGenerator CreateCodeGenerator(string className, string rootNamespaceName, string sourceFileName, RazorEngineHost host) { return new CSharpRazorCodeGenerator(className, rootNamespaceName, sourceFileName, host, StrictMode); } } }