CodeGeneratorContext.Create Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The Razor engine host.
- className
- String
The class name for the generated class type declaration.
- rootNamespace
- String
The name for the generated namespace declaration.
- sourceFile
- String
The source file.
- shouldGenerateLinePragmas
- Boolean
true to enable the generation of line pragmas; otherwise, false.
Returns
The newly created instance of the code generator context.