C# Class ServiceStack.Razor.Managers.RazorPageResolver

A common hook into ServiceStack and the hosting infrastructure used to resolve requests.
Inheritance: ServiceStack.Host.Handlers.ServiceStackHandlerBase, IViewEngine
Afficher le fichier Open project: nustack/ServiceStack Class Usage Examples

Méthodes publiques

Méthode Description
CatchAllHandler ( string httpmethod, string pathInfo, string filepath ) : IHttpHandler
CreateRequest ( IRequest request, string operationName ) : object
EnsureCompiled ( ServiceStack.Razor.Managers.RazorPage page, IResponse response ) : void
FindRazorPage ( IRequest httpReq, object model ) : ServiceStack.Razor.Managers.RazorPage
GetResponse ( IRequest httpReq, object request ) : object
HasView ( string viewName, IRequest httpReq = null ) : bool
ProcessRequest ( IRequest httpReq, IResponse httpRes, object dto ) : bool

Called by the HtmlFormat:IPlugin who checks to see if any registered view engines can handle the response DTO. If this view engine can handle the response DTO, then process it, otherwise, returning false will allow another view engine to attempt to process it. If no view engines can process the DTO, HtmlFormat will simply handle it itself.

ProcessRequest ( IRequest httpReq, IResponse httpRes, string operationName ) : void

This is called by the hosting environment via CatchAll usually for content pages.

RazorPageResolver ( IRazorConfig config, RazorViewManager viewManager ) : System
RenderPartial ( string pageName, object model, bool renderHtml, StreamWriter writer, HtmlHelper htmlHelper ) : string
ResolveAndExecuteRazorPage ( IRequest httpReq, IResponse httpRes, object model, ServiceStack.Razor.Managers.RazorPage razorPage = null ) : IRazorView

Private Methods

Méthode Description
CreateRazorPageInstance ( IRequest httpReq, IResponse httpRes, object dto, ServiceStack.Razor.Managers.RazorPage razorPage ) : IRazorView
ExecuteRazorPageWithLayout ( IRequest httpReq, IResponse httpRes, object model, IRazorView page, Func layout ) : string>.Tuple
PrepareAndSetModel ( IRazorView page, IRequest httpReq, object dto ) : void

Method Details

CatchAllHandler() public méthode

public CatchAllHandler ( string httpmethod, string pathInfo, string filepath ) : IHttpHandler
httpmethod string
pathInfo string
filepath string
Résultat IHttpHandler

CreateRequest() public méthode

public CreateRequest ( IRequest request, string operationName ) : object
request IRequest
operationName string
Résultat object

EnsureCompiled() public méthode

public EnsureCompiled ( ServiceStack.Razor.Managers.RazorPage page, IResponse response ) : void
page ServiceStack.Razor.Managers.RazorPage
response IResponse
Résultat void

FindRazorPage() public méthode

public FindRazorPage ( IRequest httpReq, object model ) : ServiceStack.Razor.Managers.RazorPage
httpReq IRequest
model object
Résultat ServiceStack.Razor.Managers.RazorPage

GetResponse() public méthode

public GetResponse ( IRequest httpReq, object request ) : object
httpReq IRequest
request object
Résultat object

HasView() public méthode

public HasView ( string viewName, IRequest httpReq = null ) : bool
viewName string
httpReq IRequest
Résultat bool

ProcessRequest() public méthode

Called by the HtmlFormat:IPlugin who checks to see if any registered view engines can handle the response DTO. If this view engine can handle the response DTO, then process it, otherwise, returning false will allow another view engine to attempt to process it. If no view engines can process the DTO, HtmlFormat will simply handle it itself.
public ProcessRequest ( IRequest httpReq, IResponse httpRes, object dto ) : bool
httpReq IRequest
httpRes IResponse
dto object
Résultat bool

ProcessRequest() public méthode

This is called by the hosting environment via CatchAll usually for content pages.
public ProcessRequest ( IRequest httpReq, IResponse httpRes, string operationName ) : void
httpReq IRequest
httpRes IResponse
operationName string
Résultat void

RazorPageResolver() public méthode

public RazorPageResolver ( IRazorConfig config, RazorViewManager viewManager ) : System
config IRazorConfig
viewManager RazorViewManager
Résultat System

RenderPartial() public méthode

public RenderPartial ( string pageName, object model, bool renderHtml, StreamWriter writer, HtmlHelper htmlHelper ) : string
pageName string
model object
renderHtml bool
writer System.IO.StreamWriter
htmlHelper HtmlHelper
Résultat string

ResolveAndExecuteRazorPage() public méthode

public ResolveAndExecuteRazorPage ( IRequest httpReq, IResponse httpRes, object model, ServiceStack.Razor.Managers.RazorPage razorPage = null ) : IRazorView
httpReq IRequest
httpRes IResponse
model object
razorPage ServiceStack.Razor.Managers.RazorPage
Résultat IRazorView