SpaFeature
A custom placeholder SharpPagesFeature plugin optimized to support for SPA and SSG features
Assembly: ServiceStack.dll
View Source
public class SpaFeature : SharpPagesFeature, IDisposable, IPlugin, IViewEngine, IHasStringId, IHasId<string>
Inherited Properties
ApiDefaultContentType
View Source
public string ApiDefaultContentType { get; set; }
ApiPath
View Source
public string ApiPath { get; set; }
DebugDefaultTemplate
View Source
public string DebugDefaultTemplate { get; set; }
DisablePageBasedRouting
View Source
public bool DisablePageBasedRouting { get; set; }
EnableHotReload
View Source
public bool? EnableHotReload { get; set; }
EnableSpaFallback
View Source
public bool? EnableSpaFallback { get; set; }
ExcludeProtectedFilters
View Source
public bool ExcludeProtectedFilters { set; }
HtmlExtension
View Source
public string HtmlExtension { get; set; }
Id
View Source
public string Id { get; set; }
IgnorePaths
View Source
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
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
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
public string ScriptAdminRole { get; set; }
ServiceStackScripts
View Source
public ServiceStackScripts ServiceStackScripts { get; }
Inherited Methods
GetRoutingPage(String, out Dictionary<String, Object>)
Resolve Page-based Routing page from /path/info
View Source
public SharpPage GetRoutingPage(string pathInfo, out Dictionary<string, object> routingArgs)
Returns
Parameters
Type | Name |
---|---|
System.String | pathInfo |
System.Collections.Generic.Dictionary<System.String,System.Object> | routingArgs |
GetViewPage(String)
View Source
public SharpPage GetViewPage(string viewName)
Returns
Parameters
Type | Name |
---|---|
System.String | viewName |
HasView(String, IRequest)
View Source
public bool HasView(string viewName, IRequest httpReq = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | viewName |
ServiceStack.Web.IRequest | httpReq |
PageBasedRoutingHandler(String, String, String)
View Source
protected virtual IHttpHandler PageBasedRoutingHandler(string httpMethod, string pathInfo, string requestFilePath)
Returns
System.Web.IHttpHandler
Parameters
Type | Name |
---|---|
System.String | httpMethod |
System.String | pathInfo |
System.String | requestFilePath |
ProcessRequestAsync(IRequest, Object, Stream)
View Source
public async Task<bool> ProcessRequestAsync(IRequest req, object dto, Stream outputStream)
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.Object | dto |
System.IO.Stream | outputStream |
Register(IAppHost)
View Source
public virtual void Register(IAppHost appHost)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
RenderPartial(String, Object, Boolean, StreamWriter, IHtmlContext)
View Source
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 |
System.IO.StreamWriter | writer |
ServiceStack.Html.IHtmlContext | htmlHelper |
RequestHandler(String, String, String)
View Source
protected virtual IHttpHandler RequestHandler(string httpMethod, string pathInfo, string filePath)
Returns
System.Web.IHttpHandler
Parameters
Type | Name |
---|---|
System.String | httpMethod |
System.String | pathInfo |
System.String | filePath |
RunInitPage()
View Source
public string RunInitPage()
Returns
System.String