Skip to main content

MarkdownViewBase

Assembly: ServiceStack.Razor.dll​
View Source​
Declaration
public abstract class MarkdownViewBase : ITemplatePage

Properties​

ViewEngine​

Reference to MarkdownViewEngine

View Source​
Declaration
public IViewEngine ViewEngine { get; set; }

AppHost​

The AppHost so you can access configuration and resolve dependencies, etc.

View Source​
Declaration
public IAppHost AppHost { get; set; }

MarkdownPage​

This precompiled Markdown page with Metadata

View Source​
Declaration
public MarkdownPage MarkdownPage { get; protected set; }

Html​

ASP.NET MVC's HtmlHelper

View Source​
Declaration
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​
Declaration
public Dictionary<string, object> ScopeArgs { get; set; }

RenderHtml​

Whether HTML or Markdown output is requested

View Source​
Declaration
public bool RenderHtml { get; protected set; }

Model​

The Response DTO

View Source​
Declaration
public object Model { get; protected set; }

Methods​

GetHtmlHelper()​

Ensure the same instance is used for subclasses

View Source​
Declaration
protected virtual HtmlHelper GetHtmlHelper()
Returns​

ServiceStack.Html.HtmlHelper

Init(IAppHost, MarkdownPage, Dictionary<String, Object>, Object, Boolean)​

View Source​
Declaration
public virtual void Init(IAppHost appHost, MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, object model, bool renderHtml)
Parameters​
TypeName
ServiceStack.IAppHostappHost
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs
System.Objectmodel
System.BooleanrenderHtml

InitHelpers()​

Called before page is executed

View Source​
Declaration
public virtual void InitHelpers()

OnLoad()​

Called after page is executed but before it's merged with the website template if any.

View Source​
Declaration
public virtual void OnLoad()

Raw(String)​

Don't HTML encode safe output

View Source​
Declaration
public MvcHtmlString Raw(string content)
Returns​

ServiceStack.Html.MvcHtmlString

Parameters​
TypeName
System.Stringcontent

Partial(String, Object)​

Return the output of a different view with the specified name using the supplied model

View Source​
Declaration
public MvcHtmlString Partial(string viewName, object model)
Returns​

ServiceStack.Html.MvcHtmlString

Parameters​
TypeName
System.StringviewName
System.Objectmodel

Get<T>()​

Resolve registered Assemblies

View Source​
Declaration
public T Get<T>()
Returns​

<T>

Type Parameters​
  • T

Lower(String)​

View Source​
Declaration
public string Lower(string name)
Returns​

System.String

Parameters​
TypeName
System.Stringname

Upper(String)​

View Source​
Declaration
public string Upper(string name)
Returns​

System.String

Parameters​
TypeName
System.Stringname

Combine(String, String[])​

View Source​
Declaration
public string Combine(string separator, params string[] parts)
Returns​

System.String

Parameters​
TypeName
System.Stringseparator
System.String[]parts

Implements​