Skip to main content

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​
TypeName
System.StringfilePath

RefreshPage(String)​

View Source​
Declaration
public virtual RazorPage RefreshPage(string filePath)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
System.StringfilePath

InvalidatePage(RazorPage, Boolean)​

View Source​
Declaration
public virtual void InvalidatePage(RazorPage page, bool compile = true)
Parameters​
TypeName
ServiceStack.Razor.Managers.RazorPagepage
System.Booleancompile

AddPage(IVirtualFile)​

View Source​
Declaration
public virtual RazorPage AddPage(IVirtualFile file)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
IVirtualFilefile

AddPage(Type)​

View Source​
Declaration
public virtual RazorPage AddPage(Type pageType)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
System.TypepageType

TrackPage(IVirtualFile)​

View Source​
Declaration
public virtual RazorPage TrackPage(IVirtualFile file)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
IVirtualFilefile

TrackPage(Type)​

View Source​
Declaration
public virtual RazorPage TrackPage(Type pageType)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
System.TypepageType

AddPage(RazorPage, String)​

View Source​
Declaration
protected virtual RazorPage AddPage(RazorPage page, string pagePath = null)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
ServiceStack.Razor.Managers.RazorPagepage
System.StringpagePath

GetPage(String)​

View Source​
Declaration
public virtual RazorPage GetPage(string absolutePath)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
System.StringabsolutePath

GetPage(IVirtualFile)​

View Source​
Declaration
public RazorPage GetPage(IVirtualFile file)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
IVirtualFilefile

GetViewPage(String)​

View Source​
Declaration
public virtual RazorPage GetViewPage(string pageName)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
System.StringpageName

GetContentPage(String)​

View Source​
Declaration
public virtual RazorPage GetContentPage(string pathInfo)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
System.StringpathInfo

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​
TypeName
System.StringlayoutName
ServiceStack.Razor.Managers.RazorPagepage
IRequestrequest
System.Objectdto

GetPartialPage(IHttpRequest, String)​

View Source​
Declaration
public virtual RazorPage GetPartialPage(IHttpRequest httpReq, string partialName)
Returns​

ServiceStack.Razor.Managers.RazorPage

Parameters​
TypeName
IHttpRequesthttpReq
System.StringpartialName

IsWatchedFile(IVirtualFile)​

View Source​
Declaration
public virtual bool IsWatchedFile(IVirtualFile file)
Returns​

System.Boolean

Parameters​
TypeName
IVirtualFilefile

IsWatchedFile(String)​

View Source​
Declaration
public virtual bool IsWatchedFile(string fileName)
Returns​

System.Boolean

Parameters​
TypeName
System.StringfileName

GetDictionaryPagePath(String)​

View Source​
Declaration
public virtual string GetDictionaryPagePath(string relativePath)
Returns​

System.String

Parameters​
TypeName
System.StringrelativePath

GetDictionaryPagePath(IVirtualFile)​

View Source​
Declaration
public virtual string GetDictionaryPagePath(IVirtualFile file)
Returns​

System.String

Parameters​
TypeName
IVirtualFilefile

PrecompilePage(RazorPage)​

View Source​
Declaration
protected virtual Task<RazorPage> PrecompilePage(RazorPage page)
Returns​

System.Threading.Tasks.Task<ServiceStack.Razor.Managers.RazorPage>

Parameters​
TypeName
ServiceStack.Razor.Managers.RazorPagepage

EnsureCompiled(RazorPage)​

View Source​
Declaration
public virtual void EnsureCompiled(RazorPage page)
Parameters​
TypeName
ServiceStack.Razor.Managers.RazorPagepage

GetRelativePath(String)​

View Source​
Declaration
public virtual string GetRelativePath(string ospath)
Returns​

System.String

Parameters​
TypeName
System.Stringospath

GetVirtualFile(String)​

View Source​
Declaration
public virtual IVirtualFile GetVirtualFile(string ospath)
Returns​

IVirtualFile

Parameters​
TypeName
System.Stringospath