Skip to main content

SpaFeature

A custom placeholder SharpPagesFeature plugin optimized to support for SPA and SSG features

Assembly: ServiceStack.dll
View Source
Declaration
public class SpaFeature : SharpPagesFeature, IDisposable, IPlugin, IViewEngine, IHasStringId, IHasId<string>

Inherited Properties

ApiDefaultContentType

View Source
Declaration
public string ApiDefaultContentType { get; set; }

ApiPath

View Source
Declaration
public string ApiPath { get; set; }

DebugDefaultTemplate

View Source
Declaration
public string DebugDefaultTemplate { get; set; }

DisablePageBasedRouting

View Source
Declaration
public bool DisablePageBasedRouting { get; set; }

EnableHotReload

View Source
Declaration
public bool? EnableHotReload { get; set; }

EnableSpaFallback

View Source
Declaration
public bool? EnableSpaFallback { get; set; }

ExcludeProtectedFilters

View Source
Declaration
public bool ExcludeProtectedFilters { set; }

HtmlExtension

View Source
Declaration
public string HtmlExtension { get; set; }

Id

View Source
Declaration
public string Id { get; set; }

IgnorePaths

View Source
Declaration
public List<string> IgnorePaths { get; set; }

ImportRequestParams

Whether to auto populate scoped args with Request.FormData[] and Request.QueryString[] params (default false). Recommendation is to instead use form.name or query.name (or qs.name) to explicitly reference user input values.

View Source
Declaration
public bool ImportRequestParams { get; set; }

MetadataDebugAdminRole

Role Required to call Metadata Debug Service (/metadata/debug). If null Metadata Debug Service will only be registered in DebugMode.

View Source
Declaration
public string MetadataDebugAdminRole { get; set; }

ScriptAdminRole

Role Required to call Templates Admin Service (/script/admin), Default is Admin. If null Templates Admin Service will not be registered.

View Source
Declaration
public string ScriptAdminRole { get; set; }

ServiceStackScripts

View Source
Declaration
public ServiceStackScripts ServiceStackScripts { get; }

Inherited Methods

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

Resolve Page-based Routing page from /path/info

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

ServiceStack.Script.SharpPage

Parameters
TypeName
System.StringpathInfo
System.Collections.Generic.Dictionary<System.String,System.Object>routingArgs

GetViewPage(String)

View Source
Declaration
public SharpPage GetViewPage(string viewName)
Returns

ServiceStack.Script.SharpPage

Parameters
TypeName
System.StringviewName

HasView(String, IRequest)

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

System.Boolean

Parameters
TypeName
System.StringviewName
ServiceStack.Web.IRequesthttpReq

PageBasedRoutingHandler(String, String, String)

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

System.Web.IHttpHandler

Parameters
TypeName
System.StringhttpMethod
System.StringpathInfo
System.StringrequestFilePath

ProcessRequestAsync(IRequest, Object, Stream)

View Source
Declaration
public async Task<bool> ProcessRequestAsync(IRequest req, object dto, Stream outputStream)
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
ServiceStack.Web.IRequestreq
System.Objectdto
System.IO.StreamoutputStream

Register(IAppHost)

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

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
System.IO.StreamWriterwriter
ServiceStack.Html.IHtmlContexthtmlHelper

RequestHandler(String, String, String)

View Source
Declaration
protected virtual IHttpHandler RequestHandler(string httpMethod, string pathInfo, string filePath)
Returns

System.Web.IHttpHandler

Parameters
TypeName
System.StringhttpMethod
System.StringpathInfo
System.StringfilePath

RunInitPage()

View Source
Declaration
public string RunInitPage()
Returns

System.String

Implements