Skip to main content

MarkdownFormat

Assembly: ServiceStack.Razor.dll
View Source
Declaration
public class MarkdownFormat : IViewEngine, IPlugin

Properties

Instance

View Source
Declaration
public static MarkdownFormat Instance { get; }

MarkdownBaseType

View Source
Declaration
public Type MarkdownBaseType { get; set; }

MarkdownGlobalHelpers

View Source
Declaration
public Dictionary<string, Type> MarkdownGlobalHelpers { get; set; }

FindMarkdownPagesFn

View Source
Declaration
public Func<string, IEnumerable<MarkdownPage>> FindMarkdownPagesFn { get; set; }

AppHost

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

ReplaceTokens

View Source
Declaration
public Dictionary<string, string> ReplaceTokens { get; set; }

VirtualPathProvider

View Source
Declaration
public IVirtualPathProvider VirtualPathProvider { get; set; }

CheckLastModifiedForChanges

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

Fields

DefaultTemplateName

View Source
Declaration
public static string DefaultTemplateName

DefaultTemplate

View Source
Declaration
public static string DefaultTemplate

DefaultPage

View Source
Declaration
public static string DefaultPage

TemplatePlaceHolder

View Source
Declaration
public static string TemplatePlaceHolder

WebHostUrlPlaceHolder

View Source
Declaration
public static string WebHostUrlPlaceHolder

MarkdownExt

View Source
Declaration
public static string MarkdownExt

TemplateExt

View Source
Declaration
public static string TemplateExt

SharedDir

View Source
Declaration
public static string SharedDir

PageExts

View Source
Declaration
public static string[] PageExts

ViewPages

View Source
Declaration
public Dictionary<string, MarkdownPage> ViewPages

ViewSharedPages

View Source
Declaration
public Dictionary<string, MarkdownPage> ViewSharedPages

ContentPages

View Source
Declaration
public Dictionary<string, MarkdownPage> ContentPages

MasterPageTemplates

View Source
Declaration
public Dictionary<string, MarkdownTemplate> MasterPageTemplates

Methods

Register(IAppHost)

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

FindByPathInfo(String)

View Source
Declaration
public MarkdownPage FindByPathInfo(string pathInfo)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.StringpathInfo

ProcessRequestAsync(IRequest, Object, Stream)

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

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

Parameters
TypeName
IRequestreq
System.Objectdto
System.IO.StreamoutputStream

HasView(String, IRequest)

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

System.Boolean

Parameters
TypeName
System.StringviewName
IRequesthttpReq

RenderPartial(String, Object, Boolean, StreamWriter, IHtmlContext)

View Source
Declaration
public string RenderPartial(string pageName, object model, bool renderHtml, StreamWriter writer, IHtmlContext htmlHelper = null)
Returns

System.String

Parameters
TypeName
System.StringpageName
System.Objectmodel
System.BooleanrenderHtml
System.IO.StreamWriterwriter
ServiceStack.Html.IHtmlContexthtmlHelper

GetViewPage(String, IRequest)

View Source
Declaration
public MarkdownPage GetViewPage(string viewName, IRequest httpReq)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.StringviewName
IRequesthttpReq

ProcessMarkdownPage(IRequest, MarkdownPage, Object, Stream)

View Source
Declaration
public bool ProcessMarkdownPage(IRequest httpReq, MarkdownPage markdownPage, object dto, Stream outputStream)
Returns

System.Boolean

Parameters
TypeName
IRequesthttpReq
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage
System.Objectdto
System.IO.StreamoutputStream

ReloadModifiedPageAndTemplates(MarkdownPage)

View Source
Declaration
public void ReloadModifiedPageAndTemplates(MarkdownPage markdownPage)
Parameters
TypeName
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage

SerializeToStreamAsync(IRequest, Object, Stream)

Render Markdown for text/markdown and text/plain ContentTypes

View Source
Declaration
public async Task SerializeToStreamAsync(IRequest request, object response, Stream stream)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
IRequestrequest
System.Objectresponse
System.IO.Streamstream

GetPageName(Object, IRequest)

View Source
Declaration
public string GetPageName(object dto, IRequest req)
Returns

System.String

Parameters
TypeName
System.Objectdto
IRequestreq

GetViewPageByResponse(Object, IRequest)

View Source
Declaration
public MarkdownPage GetViewPageByResponse(object dto, IRequest httpReq)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.Objectdto
IRequesthttpReq

GetViewPage(String)

View Source
Declaration
public MarkdownPage GetViewPage(string pageName)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.StringpageName

GetContentPage(String)

View Source
Declaration
public MarkdownPage GetContentPage(string pageFilePath)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.StringpageFilePath

GetContentPage(String[])

View Source
Declaration
public MarkdownPage GetContentPage(params string[] pageFilePaths)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.String[]pageFilePaths

RegisterMarkdownPages(String)

View Source
Declaration
public void RegisterMarkdownPages(string dirPath)
Parameters
TypeName
System.StringdirPath

FindMarkdownPages(String)

View Source
Declaration
public IEnumerable<MarkdownPage> FindMarkdownPages(string dirPath)
Returns

System.Collections.Generic.IEnumerable<ServiceStack.Support.Markdown.MarkdownPage>

Parameters
TypeName
System.StringdirPath

RegisterMarkdownPage(MarkdownPage)

View Source
Declaration
public void RegisterMarkdownPage(MarkdownPage markdownPage)
Parameters
TypeName
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage

RefreshPage(String)

View Source
Declaration
public MarkdownPage RefreshPage(string filePath)
Returns

ServiceStack.Support.Markdown.MarkdownPage

Parameters
TypeName
System.StringfilePath

AddPage(MarkdownPage)

View Source
Declaration
public void AddPage(MarkdownPage page)
Parameters
TypeName
ServiceStack.Support.Markdown.MarkdownPagepage

AddTemplate(String, String)

View Source
Declaration
public MarkdownTemplate AddTemplate(string templatePath, string templateContents)
Returns

ServiceStack.Support.Markdown.MarkdownTemplate

Parameters
TypeName
System.StringtemplatePath
System.StringtemplateContents

Transform(String)

View Source
Declaration
public string Transform(string template)
Returns

System.String

Parameters
TypeName
System.Stringtemplate

Transform(String, Boolean)

View Source
Declaration
public string Transform(string template, bool renderHtml)
Returns

System.String

Parameters
TypeName
System.Stringtemplate
System.BooleanrenderHtml

RenderStaticPageHtml(String)

View Source
Declaration
public string RenderStaticPageHtml(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

RenderStaticPage(String, Boolean)

View Source
Declaration
public string RenderStaticPage(string filePath, bool renderHtml)
Returns

System.String

Parameters
TypeName
System.StringfilePath
System.BooleanrenderHtml

RenderDynamicPageHtml(String, Object)

View Source
Declaration
public string RenderDynamicPageHtml(string pageName, object model)
Returns

System.String

Parameters
TypeName
System.StringpageName
System.Objectmodel

RenderDynamicPageHtml(String)

View Source
Declaration
public string RenderDynamicPageHtml(string pageName)
Returns

System.String

Parameters
TypeName
System.StringpageName

RenderDynamicPageHtml(String, Dictionary<String, Object>)

View Source
Declaration
public string RenderDynamicPageHtml(string pageName, Dictionary<string, object> scopeArgs)
Returns

System.String

Parameters
TypeName
System.StringpageName
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs

RenderDynamicPage(String, Object, Boolean)

View Source
Declaration
public string RenderDynamicPage(string pageName, object model, bool renderHtml)
Returns

System.String

Parameters
TypeName
System.StringpageName
System.Objectmodel
System.BooleanrenderHtml

RenderDynamicPage(MarkdownPage, Dictionary<String, Object>, Boolean, Boolean, String)

View Source
Declaration
public string RenderDynamicPage(MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, bool renderHtml, bool renderTemplate, string templatePath = null)
Returns

System.String

Parameters
TypeName
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs
System.BooleanrenderHtml
System.BooleanrenderTemplate
System.StringtemplatePath

Implements