RazorFormat
Assembly: ServiceStack.Mvc.dll
View Source
Declaration
public class RazorFormat : object, IPlugin, IViewEngine, IHasStringId, IHasId<string>
Properties
Id
View Source
Declaration
public string Id { get; set; }
DefaultLayout
View Source
Declaration
public static string DefaultLayout { get; set; }
ViewLocations
View Source
Declaration
public List<string> ViewLocations { get; set; }
PagesPath
View Source
Declaration
public string PagesPath { get; set; }
ViewEngine
View Source
Declaration
public IRazorViewEngine ViewEngine { get; }
DisablePageBasedRouting
View Source
Declaration
public bool DisablePageBasedRouting { get; set; }
IndexPage
View Source
Declaration
public string IndexPage { get; set; }
Fields
log
View Source
Declaration
public static ILog log
Methods
GetDefaultViewLocations(IVirtualFiles)
View Source
Declaration
public static List<string> GetDefaultViewLocations(IVirtualFiles virtualFiles)
Returns
List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | virtualFiles |
Register(IAppHost)
View Source
Declaration
public void Register(IAppHost appHost)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
CatchAllHandler(String, String, String)
View Source
Declaration
public IHttpHandler CatchAllHandler(string httpMethod, string pathInfo, string filepath)
Returns
ServiceStack.Host.IHttpHandler
Parameters
Type | Name |
---|---|
System.String | httpMethod |
System.String | pathInfo |
System.String | filepath |
GetPageFromPathInfo(String)
View Source
Declaration
public ViewEngineResult GetPageFromPathInfo(string pathInfo)
Returns
ViewEngineResult
Parameters
Type | Name |
---|---|
System.String | pathInfo |
HasView(String, IRequest)
View Source
Declaration
public bool HasView(string viewName, IRequest httpReq = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | viewName |
ServiceStack.Web.IRequest | httpReq |
RenderPartial(String, Object, Boolean, StreamWriter, IHtmlContext)
View Source
Declaration
public string RenderPartial(string pageName, object model, bool renderHtml, StreamWriter writer = null, IHtmlContext htmlHelper = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | pageName |
System.Object | model |
System.Boolean | renderHtml |
StreamWriter | writer |
ServiceStack.Html.IHtmlContext | htmlHelper |
PageBasedRoutingHandler(String, String, String)
View Source
Declaration
protected virtual IHttpHandler PageBasedRoutingHandler(string httpMethod, string pathInfo, string requestFilePath)
Returns
ServiceStack.Host.IHttpHandler
Parameters
Type | Name |
---|---|
System.String | httpMethod |
System.String | pathInfo |
System.String | requestFilePath |
GetRoutingPage(String, out Dictionary<String, Object>)
View Source
Declaration
public ViewEngineResult GetRoutingPage(string pathInfo, out Dictionary<string, object> routingArgs)
Returns
ViewEngineResult
Parameters
Type | Name |
---|---|
System.String | pathInfo |
Dictionary<System.String,System.Object> | routingArgs |
ProcessRequestAsync(IRequest, Object, Stream)
View Source
Declaration
public async Task<bool> ProcessRequestAsync(IRequest req, object dto, Stream outputStream)
Returns
Task<System.Boolean>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.Object | dto |
Stream | outputStream |
GetViewPage(String)
View Source
Declaration
public IView GetViewPage(string path)
Returns
IView
Parameters
Type | Name |
---|---|
System.String | path |
GetContentPage(String)
View Source
Declaration
public IView GetContentPage(string path)
Returns
IView
Parameters
Type | Name |
---|---|
System.String | path |
FindView(IEnumerable<String>, out Dictionary<String, Object>)
View Source
Declaration
public ViewEngineResult FindView(IEnumerable<string> viewNames, out Dictionary<string, object> routingArgs)
Returns
ViewEngineResult
Parameters
Type | Name |
---|---|
IEnumerable<System.String> | viewNames |
Dictionary<System.String,System.Object> | routingArgs |
RenderToHtmlAsync(IView, Object, String)
View Source
Declaration
public async Task<ReadOnlyMemory<char>> RenderToHtmlAsync(IView view, object model = null, string layout = null)
Returns
Task<ReadOnlyMemory<System.Char>>
Parameters
Type | Name |
---|---|
IView | view |
System.Object | model |
System.String | layout |
WriteHtmlAsync(Stream, IView, Object, String, HttpContext, IRequest)
View Source
Declaration
public async Task WriteHtmlAsync(Stream stream, IView view, object model = null, string layout = null, HttpContext ctx = null, IRequest req = null)
Returns
Task
Parameters
Type | Name |
---|---|
Stream | stream |
IView | view |
System.Object | model |
System.String | layout |
HttpContext | ctx |
ServiceStack.Web.IRequest | req |