CodeGeneratorContext.Create(RazorEngineHost, String, String, String, Boolean) CodeGeneratorContext.Create(RazorEngineHost, String, String, String, Boolean) CodeGeneratorContext.Create(RazorEngineHost, String, String, String, Boolean) Method

Definition

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Creates a new instance of the CodeGeneratorContext class.

public static System.Web.Razor.Generator.CodeGeneratorContext Create (System.Web.Razor.RazorEngineHost host, string className, string rootNamespace, string sourceFile, bool shouldGenerateLinePragmas);
static member Create : System.Web.Razor.RazorEngineHost * string * string * string * bool -> System.Web.Razor.Generator.CodeGeneratorContext
Public Shared Function Create (host As RazorEngineHost, className As String, rootNamespace As String, sourceFile As String, shouldGenerateLinePragmas As Boolean) As CodeGeneratorContext
Parameters
host
RazorEngineHost RazorEngineHost RazorEngineHost

The Razor engine host.

className
String String String

The class name for the generated class type declaration.

rootNamespace
String String String

The name for the generated namespace declaration.

sourceFile
String String String

The source file.

shouldGenerateLinePragmas
Boolean Boolean Boolean

true to enable the generation of line pragmas; otherwise, false.

Returns

The newly created instance of the code generator context.

Applies to