메소드 | 설명 | |
---|---|---|
CompileTemplate ( string className, string template, |
Compiles the string template into a ITemplate.
|
|
CreateTemplate ( string template, |
Creates a ITemplate from the specified string template.
|
|
GetCode ( string className, string template, |
Compiles the string cshtml template into a cs string
|
|
RazorCompiler ( ILanguageProvider provider, |
Initialises a new instance of RazorCompiler
|
메소드 | 설명 | |
---|---|---|
AddNamespaceImports ( |
Adds any required namespace imports to the generated
|
|
AddReferences ( |
Adds any required references to the compiler parameters.
|
|
BuildDynamicName ( |
Builds the full declarative name of the specified type with a dynamic type argument.
|
|
BuildName ( ILanguageProvider provider, |
Builds the full declarative name of the specified type.
|
|
GenerateCode ( |
Generates the required code using the specified compile unit.
|
|
GetBaseTypeDeclaration ( ILanguageProvider languageProvider, |
Gets the base type declaration for the template.
|
|
GetBaseTypeReferencedAssemblies ( ) : IEnumerable |
Gets the locations of assemblies referenced by a custom base template type.
|
|
GetCoreReferences ( ) : IEnumerable |
Gets the locations of all core referenced assemblies.
|
|
IsAnonymousType ( |
Determines if the specified type represents an anonymous type.
|
|
ParseTemplate ( string template, System.Web.Razor.Parser.RazorParser parser, System.Web.Razor.Parser.ParserVisitor visitor ) : void |
Parses the specified template.
|
public CompileTemplate ( string className, string template, |
||
className | string | The name of the compiled class. |
template | string | The template to compile. |
modelType | [Optional] The model type. | |
리턴 |
public CreateTemplate ( string template, |
||
template | string | The string template to create a |
modelType | [Optional] The model type. | |
리턴 | ITemplate |
public GetCode ( string className, string template, |
||
className | string | The name of the compiled class. |
template | string | The template to compile. |
modelType | [Optional] The model type. | |
baseTypeName | string | [Optional] Base type for the template. To be used if the model type is /// in an unreferenced assembly. |
outputNamespace | string | |
리턴 | string |
public RazorCompiler ( ILanguageProvider provider, |
||
provider | ILanguageProvider | The language provider used to create language services. |
baseType | [Optional] The template base type. | |
parser | System.Web.Razor.Parser.MarkupParser | [Optional] The markup parser. |
리턴 | System |