RazorFormat
Assembly: ServiceStack.Razor.dll
View Source
Declaration
public class RazorFormat : IPlugin, IRazorPlugin, IRazorConfig
Properties
Id
View Source
Declaration
public string Id { get; set; }
RazorFileExtension
View Source
Declaration
public string RazorFileExtension { get; set; }
PageBaseType
View Source
Declaration
public Type PageBaseType { get; set; }
DefaultPageName
View Source
Declaration
public string DefaultPageName { get; set; }
WebHostUrl
View Source
Declaration
public string WebHostUrl { get; set; }
ScanRootPath
View Source
Declaration
public string ScanRootPath { get; set; }
LoadFromAssemblies
View Source
Declaration
public List<Assembly> LoadFromAssemblies { get; set; }
Deny
View Source
Declaration
public List<Predicate<string>> Deny { get; set; }
EnableLiveReload
View Source
Declaration
public bool? EnableLiveReload { get; set; }
CheckLastModifiedForChanges
View Source
Declaration
public bool? CheckLastModifiedForChanges { get; set; }
PrecompilePages
View Source
Declaration
public bool? PrecompilePages { get; set; }
WaitForPrecompilationOnStartup
View Source
Declaration
public bool? WaitForPrecompilationOnStartup { get; set; }
MinifyHtml
View Source
Declaration
public bool MinifyHtml { get; set; }
UseAdvancedCompression
View Source
Declaration
public bool UseAdvancedCompression { get; set; }
LoadUnloadedAssemblies
View Source
Declaration
public bool LoadUnloadedAssemblies { get; set; }
VirtualFileSources
View Source
Declaration
public IVirtualPathProvider VirtualFileSources { get; set; }
LiveReload
View Source
Declaration
public ILiveReload LiveReload { get; set; }
LiveReloadFactory
View Source
Declaration
public Func<RazorViewManager, ILiveReload> LiveReloadFactory { get; set; }
RenderPartialFn
View Source
Declaration
public RenderPartialDelegate RenderPartialFn { get; set; }
CompileFilter
View Source
Declaration
public Action<CompilerParameters> CompileFilter { get; set; }
OnWriteLiteral
View Source
Declaration
public Action<RenderingPage, string> OnWriteLiteral { set; }
OnWriteLiteralTo
View Source
Declaration
public Action<RenderingPage, TextWriter, string> OnWriteLiteralTo { set; }
WatchForModifiedPages
View Source
Declaration
public bool WatchForModifiedPages { get; set; }
Fields
TemplatePlaceHolder
View Source
Declaration
public const string TemplatePlaceHolder = "@RenderBody()"
Instance
View Source
Declaration
public static RazorFormat Instance
ViewManager
View Source
Declaration
protected RazorViewManager ViewManager
PageResolver
View Source
Declaration
protected RazorPageResolver PageResolver
Methods
DenyPathsWithLeading_(String)
View Source
Declaration
public static bool DenyPathsWithLeading_(string path)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | path |
DenyDirectAccessToViews(String)
View Source
Declaration
public static bool DenyDirectAccessToViews(string path)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | path |
Register(IAppHost)
View Source
Declaration
public void Register(IAppHost appHost)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
Init()
View Source
Declaration
public virtual RazorFormat Init()
Returns
ServiceStack.Razor.RazorFormat
CreatePageResolver()
View Source
Declaration
public virtual RazorPageResolver CreatePageResolver()
Returns
ServiceStack.Razor.Managers.RazorPageResolver
CreateViewManager()
View Source
Declaration
public virtual RazorViewManager CreateViewManager()
Returns
ServiceStack.Razor.Managers.RazorViewManager
ProcessRazorPage(IRequest, RazorPage, Object, IResponse)
View Source
Declaration
public IRazorView ProcessRazorPage(IRequest httpReq, RazorPage contentPage, object model, IResponse httpRes)
Returns
Parameters
Type | Name |
---|---|
IRequest | httpReq |
ServiceStack.Razor.Managers.RazorPage | contentPage |
System.Object | model |
IResponse | httpRes |
ProcessRequest(IRequest, IResponse, Object)
View Source
Declaration
public void ProcessRequest(IRequest httpReq, IResponse httpRes, object dto)
Parameters
Type | Name |
---|---|
IRequest | httpReq |
IResponse | httpRes |
System.Object | dto |
ProcessContentPageRequest(IRequest, IResponse)
View Source
Declaration
public void ProcessContentPageRequest(IRequest httpReq, IResponse httpRes)
Parameters
Type | Name |
---|---|
IRequest | httpReq |
IResponse | httpRes |
AddPage(String)
View Source
Declaration
public RazorPage AddPage(string filePath)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | filePath |
RefreshPage(String)
View Source
Declaration
public RazorPage RefreshPage(string filePath)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | filePath |
GetViewPage(String)
View Source
Declaration
public RazorPage GetViewPage(string pageName)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | pageName |
GetContentPage(String)
View Source
Declaration
public RazorPage GetContentPage(string pathInfo)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | pathInfo |
CreatePage(String)
View Source
Declaration
public RazorPage CreatePage(string razorContents)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | razorContents |
RenderToHtml(String, Object, String)
View Source
Declaration
public string RenderToHtml(string filePath, object model = null, string layout = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | filePath |
System.Object | model |
System.String | layout |
CreateAndRenderToHtml(String, Object, String)
View Source
Declaration
public string CreateAndRenderToHtml(string razorContents, object model = null, string layout = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | razorContents |
System.Object | model |
System.String | layout |
RenderToHtml(RazorPage, Object, String)
View Source
Declaration
public string RenderToHtml(RazorPage razorPage, object model = null, string layout = null)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Razor.Managers.RazorPage | razorPage |
System.Object | model |
System.String | layout |
RenderToHtml(RazorPage, out IRazorView, Object, String)
View Source
Declaration
public string RenderToHtml(RazorPage razorPage, out IRazorView razorView, object model = null, string layout = null)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Razor.Managers.RazorPage | razorPage |
ServiceStack.Html.IRazorView | razorView |
System.Object | model |
System.String | layout |