RazorViewManager
This view manager is responsible for keeping track of all the available Razor views and states of Razor pages.
Assembly: ServiceStack.Razor.dll
View Source
Declaration
public class RazorViewManager
Properties
Config
View Source
Declaration
protected IRazorConfig Config { get; set; }
IncludeDebugInformation
View Source
Declaration
public bool IncludeDebugInformation { get; set; }
CompileFilter
View Source
Declaration
public Action<CompilerParameters> CompileFilter { get; set; }
CheckLastModifiedForChanges
View Source
Declaration
public bool CheckLastModifiedForChanges { get; set; }
Fields
Log
View Source
Declaration
public static ILog Log
Pages
View Source
Declaration
public Dictionary<string, RazorPage> Pages
ViewNamesMap
View Source
Declaration
protected Dictionary<string, string> ViewNamesMap
PathProvider
View Source
Declaration
protected IVirtualPathProvider PathProvider
Methods
Init()
View Source
Declaration
public void Init()
AddPage(String)
View Source
Declaration
public virtual RazorPage AddPage(string filePath)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | filePath |
RefreshPage(String)
View Source
Declaration
public virtual RazorPage RefreshPage(string filePath)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | filePath |
InvalidatePage(RazorPage, Boolean)
View Source
Declaration
public virtual void InvalidatePage(RazorPage page, bool compile = true)
Parameters
Type | Name |
---|---|
ServiceStack.Razor.Managers.RazorPage | page |
System.Boolean | compile |
AddPage(IVirtualFile)
View Source
Declaration
public virtual RazorPage AddPage(IVirtualFile file)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
IVirtualFile | file |
AddPage(Type)
View Source
Declaration
public virtual RazorPage AddPage(Type pageType)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.Type | pageType |
TrackPage(IVirtualFile)
View Source
Declaration
public virtual RazorPage TrackPage(IVirtualFile file)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
IVirtualFile | file |
TrackPage(Type)
View Source
Declaration
public virtual RazorPage TrackPage(Type pageType)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.Type | pageType |
AddPage(RazorPage, String)
View Source
Declaration
protected virtual RazorPage AddPage(RazorPage page, string pagePath = null)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
ServiceStack.Razor.Managers.RazorPage | page |
System.String | pagePath |
GetPage(String)
View Source
Declaration
public virtual RazorPage GetPage(string absolutePath)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | absolutePath |
GetPage(IVirtualFile)
View Source
Declaration
public RazorPage GetPage(IVirtualFile file)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
IVirtualFile | file |
GetViewPage(String)
View Source
Declaration
public virtual RazorPage GetViewPage(string pageName)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | pageName |
GetContentPage(String)
View Source
Declaration
public virtual RazorPage GetContentPage(string pathInfo)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | pathInfo |
GetLayoutPage(String, RazorPage, IRequest, Object)
View Source
Declaration
public virtual RazorPage GetLayoutPage(string layoutName, RazorPage page, IRequest request, object dto)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
System.String | layoutName |
ServiceStack.Razor.Managers.RazorPage | page |
IRequest | request |
System.Object | dto |
GetPartialPage(IHttpRequest, String)
View Source
Declaration
public virtual RazorPage GetPartialPage(IHttpRequest httpReq, string partialName)
Returns
ServiceStack.Razor.Managers.RazorPage
Parameters
Type | Name |
---|---|
IHttpRequest | httpReq |
System.String | partialName |
IsWatchedFile(IVirtualFile)
View Source
Declaration
public virtual bool IsWatchedFile(IVirtualFile file)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
IVirtualFile | file |
IsWatchedFile(String)
View Source
Declaration
public virtual bool IsWatchedFile(string fileName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | fileName |
GetDictionaryPagePath(String)
View Source
Declaration
public virtual string GetDictionaryPagePath(string relativePath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | relativePath |
GetDictionaryPagePath(IVirtualFile)
View Source
Declaration
public virtual string GetDictionaryPagePath(IVirtualFile file)
Returns
System.String
Parameters
Type | Name |
---|---|
IVirtualFile | file |
PrecompilePage(RazorPage)
View Source
Declaration
protected virtual Task<RazorPage> PrecompilePage(RazorPage page)
Returns
System.Threading.Tasks.Task<ServiceStack.Razor.Managers.RazorPage>
Parameters
Type | Name |
---|---|
ServiceStack.Razor.Managers.RazorPage | page |
EnsureCompiled(RazorPage)
View Source
Declaration
public virtual void EnsureCompiled(RazorPage page)
Parameters
Type | Name |
---|---|
ServiceStack.Razor.Managers.RazorPage | page |
GetRelativePath(String)
View Source
Declaration
public virtual string GetRelativePath(string ospath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | ospath |
GetVirtualFile(String)
View Source
Declaration
public virtual IVirtualFile GetVirtualFile(string ospath)
Returns
IVirtualFile
Parameters
Type | Name |
---|---|
System.String | ospath |