Skip to main content

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
TypeName
ServiceStack.IO.IVirtualFilesvirtualFiles

Register(IAppHost)

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

CatchAllHandler(String, String, String)

View Source
Declaration
public IHttpHandler CatchAllHandler(string httpMethod, string pathInfo, string filepath)
Returns

ServiceStack.Host.IHttpHandler

Parameters
TypeName
System.StringhttpMethod
System.StringpathInfo
System.Stringfilepath

GetPageFromPathInfo(String)

View Source
Declaration
public ViewEngineResult GetPageFromPathInfo(string pathInfo)
Returns

ViewEngineResult

Parameters
TypeName
System.StringpathInfo

HasView(String, IRequest)

View Source
Declaration
public bool HasView(string viewName, IRequest httpReq = null)
Returns

System.Boolean

Parameters
TypeName
System.StringviewName
ServiceStack.Web.IRequesthttpReq

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
TypeName
System.StringpageName
System.Objectmodel
System.BooleanrenderHtml
StreamWriterwriter
ServiceStack.Html.IHtmlContexthtmlHelper

PageBasedRoutingHandler(String, String, String)

View Source
Declaration
protected virtual IHttpHandler PageBasedRoutingHandler(string httpMethod, string pathInfo, string requestFilePath)
Returns

ServiceStack.Host.IHttpHandler

Parameters
TypeName
System.StringhttpMethod
System.StringpathInfo
System.StringrequestFilePath

GetRoutingPage(String, out Dictionary<String, Object>)

View Source
Declaration
public ViewEngineResult GetRoutingPage(string pathInfo, out Dictionary<string, object> routingArgs)
Returns

ViewEngineResult

Parameters
TypeName
System.StringpathInfo
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
TypeName
ServiceStack.Web.IRequestreq
System.Objectdto
StreamoutputStream

GetViewPage(String)

View Source
Declaration
public IView GetViewPage(string path)
Returns

IView

Parameters
TypeName
System.Stringpath

GetContentPage(String)

View Source
Declaration
public IView GetContentPage(string path)
Returns

IView

Parameters
TypeName
System.Stringpath

FindView(IEnumerable<String>, out Dictionary<String, Object>)

View Source
Declaration
public ViewEngineResult FindView(IEnumerable<string> viewNames, out Dictionary<string, object> routingArgs)
Returns

ViewEngineResult

Parameters
TypeName
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
TypeName
IViewview
System.Objectmodel
System.Stringlayout

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
TypeName
Streamstream
IViewview
System.Objectmodel
System.Stringlayout
HttpContextctx
ServiceStack.Web.IRequestreq

Implements