Skip to main content

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
TypeName
System.Stringpath

DenyDirectAccessToViews(String)

View Source
Declaration
public static bool DenyDirectAccessToViews(string path)
Returns

System.Boolean

Parameters
TypeName
System.Stringpath

Register(IAppHost)

View Source
Declaration
public void Register(IAppHost appHost)
Parameters
TypeName
ServiceStack.IAppHostappHost

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

ServiceStack.Html.IRazorView

Parameters
TypeName
IRequesthttpReq
ServiceStack.Razor.Managers.RazorPagecontentPage
System.Objectmodel
IResponsehttpRes

ProcessRequest(IRequest, IResponse, Object)

View Source
Declaration
public void ProcessRequest(IRequest httpReq, IResponse httpRes, object dto)
Parameters
TypeName
IRequesthttpReq
IResponsehttpRes
System.Objectdto

ProcessContentPageRequest(IRequest, IResponse)

View Source
Declaration
public void ProcessContentPageRequest(IRequest httpReq, IResponse httpRes)
Parameters
TypeName
IRequesthttpReq
IResponsehttpRes

AddPage(String)

View Source
Declaration
public RazorPage AddPage(string filePath)
Returns

ServiceStack.Razor.Managers.RazorPage

Parameters
TypeName
System.StringfilePath

RefreshPage(String)

View Source
Declaration
public RazorPage RefreshPage(string filePath)
Returns

ServiceStack.Razor.Managers.RazorPage

Parameters
TypeName
System.StringfilePath

GetViewPage(String)

View Source
Declaration
public RazorPage GetViewPage(string pageName)
Returns

ServiceStack.Razor.Managers.RazorPage

Parameters
TypeName
System.StringpageName

GetContentPage(String)

View Source
Declaration
public RazorPage GetContentPage(string pathInfo)
Returns

ServiceStack.Razor.Managers.RazorPage

Parameters
TypeName
System.StringpathInfo

CreatePage(String)

View Source
Declaration
public RazorPage CreatePage(string razorContents)
Returns

ServiceStack.Razor.Managers.RazorPage

Parameters
TypeName
System.StringrazorContents

RenderToHtml(String, Object, String)

View Source
Declaration
public string RenderToHtml(string filePath, object model = null, string layout = null)
Returns

System.String

Parameters
TypeName
System.StringfilePath
System.Objectmodel
System.Stringlayout

CreateAndRenderToHtml(String, Object, String)

View Source
Declaration
public string CreateAndRenderToHtml(string razorContents, object model = null, string layout = null)
Returns

System.String

Parameters
TypeName
System.StringrazorContents
System.Objectmodel
System.Stringlayout

RenderToHtml(RazorPage, Object, String)

View Source
Declaration
public string RenderToHtml(RazorPage razorPage, object model = null, string layout = null)
Returns

System.String

Parameters
TypeName
ServiceStack.Razor.Managers.RazorPagerazorPage
System.Objectmodel
System.Stringlayout

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
TypeName
ServiceStack.Razor.Managers.RazorPagerazorPage
ServiceStack.Html.IRazorViewrazorView
System.Objectmodel
System.Stringlayout

Implements