MarkdownViewBase
Assembly: ServiceStack.Razor.dll
View Source
public abstract class MarkdownViewBase : ITemplatePage
Properties
ViewEngine
Reference to MarkdownViewEngine
View Source
public IViewEngine ViewEngine { get; set; }
AppHost
The AppHost so you can access configuration and resolve dependencies, etc.
View Source
public IAppHost AppHost { get; set; }
MarkdownPage
This precompiled Markdown page with Metadata
View Source
public MarkdownPage MarkdownPage { get; protected set; }
Html
ASP.NET MVC's HtmlHelper
View Source
public HtmlHelper Html { get; protected set; }
ScopeArgs
All variables passed to and created by your page. The Response DTO is stored and accessible via the 'Model' variable.
All variables and outputs created are stored in ScopeArgs which is what's available to your website template. The Generated page is stored in the 'Body' variable.
View Source
public Dictionary<string, object> ScopeArgs { get; set; }
RenderHtml
Whether HTML or Markdown output is requested
View Source
public bool RenderHtml { get; protected set; }
Model
The Response DTO
View Source
public object Model { get; protected set; }
Methods
GetHtmlHelper()
Ensure the same instance is used for subclasses
View Source
protected virtual HtmlHelper GetHtmlHelper()
Returns
Init(IAppHost, MarkdownPage, Dictionary<String, Object>, Object, Boolean)
View Source
public virtual void Init(IAppHost appHost, MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, object model, bool renderHtml)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
ServiceStack.Support.Markdown.MarkdownPage | markdownPage |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
System.Object | model |
System.Boolean | renderHtml |
InitHelpers()
Called before page is executed
View Source
public virtual void InitHelpers()
OnLoad()
Called after page is executed but before it's merged with the website template if any.
View Source
public virtual void OnLoad()
Raw(String)
Don't HTML encode safe output
View Source
public MvcHtmlString Raw(string content)
Returns
ServiceStack.Html.MvcHtmlString
Parameters
Type | Name |
---|---|
System.String | content |
Partial(String, Object)
Return the output of a different view with the specified name using the supplied model
View Source
public MvcHtmlString Partial(string viewName, object model)
Returns
ServiceStack.Html.MvcHtmlString
Parameters
Type | Name |
---|---|
System.String | viewName |
System.Object | model |
Get<T>()
Resolve registered Assemblies
View Source
public T Get<T>()
Returns
<T>
Type Parameters
T
Lower(String)
View Source
public string Lower(string name)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | name |
Upper(String)
View Source
public string Upper(string name)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | name |
Combine(String, String[])
View Source
public string Combine(string separator, params string[] parts)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | separator |
System.String[] | parts |