RazorPageHost
Assembly: ServiceStack.Razor.dll
View Source
Declaration
public class RazorPageHost : RazorEngineHost, IRazorHost
Properties
PathProvider
View Source
Declaration
public IVirtualPathProvider PathProvider { get; protected set; }
File
View Source
Declaration
public IVirtualFile File { get; protected set; }
IncludeDebugInformation
View Source
Declaration
public bool IncludeDebugInformation { get; set; }
CompileFilter
View Source
Declaration
public Action<CompilerParameters> CompileFilter { get; set; }
DefaultClassName
View Source
Declaration
public override string DefaultClassName { get; set; }
DefaultNamespace
View Source
Declaration
public override string DefaultNamespace { get; set; }
RootNamespace
Gets or sets the root namespace used when the full namespace is inferred from the VirtualPath.
View Source
Declaration
public virtual string RootNamespace { get; set; }
Parser
View Source
Declaration
public ParserBase Parser { get; set; }
CodeGenerator
View Source
Declaration
public RazorCodeGenerator CodeGenerator { get; set; }
EnableLinePragmas
View Source
Declaration
public bool EnableLinePragmas { get; set; }
Fields
DebugSourceFiles
View Source
Declaration
public Dictionary<string, string> DebugSourceFiles
Methods
Generate()
View Source
Declaration
public GeneratorResults Generate()
Returns
GeneratorResults
GetAbsoluteErrorPath(String)
View Source
Declaration
public string GetAbsoluteErrorPath(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
Compile()
View Source
Declaration
public Type Compile()
Returns
System.Type
GenerateSourceCode()
View Source
Declaration
public string GenerateSourceCode()
Returns
System.String
PostProcessGeneratedCode(CodeGeneratorContext)
View Source
Declaration
public override void PostProcessGeneratedCode(CodeGeneratorContext context)
Parameters
Type | Name |
---|---|
CodeGeneratorContext | context |
DecorateCodeGenerator(RazorCodeGenerator)
View Source
Declaration
public override RazorCodeGenerator DecorateCodeGenerator(RazorCodeGenerator incomingCodeGenerator)
Returns
RazorCodeGenerator
Parameters
Type | Name |
---|---|
RazorCodeGenerator | incomingCodeGenerator |
GetClassName()
View Source
Declaration
protected virtual string GetClassName()
Returns
System.String
GetNamespace()
View Source
Declaration
protected virtual string GetNamespace()
Returns
System.String
SanitizeNamespace(String)
View Source
Declaration
public static string SanitizeNamespace(string inputName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | inputName |
DecorateCodeParser(ParserBase)
View Source
Declaration
public override ParserBase DecorateCodeParser(ParserBase incomingCodeParser)
Returns
ParserBase
Parameters
Type | Name |
---|---|
ParserBase | incomingCodeParser |