TemplateExtensions
Assembly: ServiceStack.Razor.dll
View Source
Declaration
public static class TemplateExtensions
Fields
StatementPlaceholderChar
View Source
Declaration
public const char StatementPlaceholderChar = '^'
Methods
SplitOnWhiteSpace(String)
View Source
Declaration
public static string[] SplitOnWhiteSpace(this string text)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | text |
SplitOnWhiteSpaceAndSymbols(String)
View Source
Declaration
public static string[] SplitOnWhiteSpaceAndSymbols(this string text)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | text |
SplitAndTrimOn(String, Char[])
View Source
Declaration
public static string[] SplitAndTrimOn(this string text, char[] chars)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | text |
System.Char[] | chars |
RenderToMarkdown(MarkdownPage, Dictionary<String, Object>)
View Source
Declaration
public static string RenderToMarkdown(this MarkdownPage markdownPage, Dictionary<string, object> scopeArgs)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Support.Markdown.MarkdownPage | markdownPage |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
RenderToHtml(MarkdownPage, Dictionary<String, Object>)
View Source
Declaration
public static string RenderToHtml(this MarkdownPage markdownPage, Dictionary<string, object> scopeArgs)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Support.Markdown.MarkdownPage | markdownPage |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
RenderToString(MarkdownPage, Dictionary<String, Object>, Boolean)
View Source
Declaration
public static string RenderToString(this MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, bool renderHtml)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Support.Markdown.MarkdownPage | markdownPage |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
System.Boolean | renderHtml |
RenderToString(ITemplateWriter, Dictionary<String, Object>)
View Source
Declaration
public static string RenderToString(this ITemplateWriter templateWriter, Dictionary<string, object> scopeArgs)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Support.Markdown.ITemplateWriter | templateWriter |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
RenderToString(IEnumerable<ITemplateWriter>, Dictionary<String, Object>)
View Source
Declaration
public static string RenderToString(this IEnumerable<ITemplateWriter> templateWriters, Dictionary<string, object> scopeArgs)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<ServiceStack.Support.Markdown.ITemplateWriter> | templateWriters |
System.Collections.Generic.Dictionary<System.String,System.Object> | scopeArgs |
SplitIntoBlocks(String, String)
View Source
Declaration
public static List<TemplateBlock> SplitIntoBlocks(this string content, string onPlaceHolder)
Returns
System.Collections.Generic.List<ServiceStack.Support.Markdown.TemplateBlock>
Parameters
Type | Name |
---|---|
System.String | content |
System.String | onPlaceHolder |
RemoveIfEndingWith(TextBlock, String)
View Source
Declaration
public static void RemoveIfEndingWith(this TextBlock textBlock, string text)
Parameters
Type | Name |
---|---|
ServiceStack.Support.Markdown.TextBlock | textBlock |
System.String | text |
TrimIfEndingWith(String, String)
View Source
Declaration
public static string TrimIfEndingWith(this string content, string text)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | content |
System.String | text |
SkipIfNextIs(String, ref Int32, String)
View Source
Declaration
public static void SkipIfNextIs(this string content, ref int pos, string text)
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | pos |
System.String | text |
TrimLineIfOnlyHasWhitespace(String)
View Source
Declaration
public static string TrimLineIfOnlyHasWhitespace(this string text)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | text |
CreateTemplateBlocks(String, List<StatementExprBlock>)
View Source
Declaration
public static List<TemplateBlock> CreateTemplateBlocks(this string content, List<StatementExprBlock> statementBlocks)
Returns
System.Collections.Generic.List<ServiceStack.Support.Markdown.TemplateBlock>
Parameters
Type | Name |
---|---|
System.String | content |
System.Collections.Generic.List<ServiceStack.Support.Markdown.StatementExprBlock> | statementBlocks |
GetNextStatementExpr(String, ref Int32)
View Source
Declaration
public static StatementExprBlock GetNextStatementExpr(this string content, ref int fromPos)
Returns
ServiceStack.Support.Markdown.StatementExprBlock
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | fromPos |
PeekAfterWhitespace(String, Int32)
View Source
Declaration
public static char PeekAfterWhitespace(this string content, int index)
Returns
System.Char
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | index |
PeekWordAfterWhitespace(String, Int32)
View Source
Declaration
public static string PeekWordAfterWhitespace(this string content, int index)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | index |
EatWhitespace(String, ref Int32)
View Source
Declaration
public static void EatWhitespace(this string content, ref int index)
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | index |
EatRestOfLine(String, ref Int32)
View Source
Declaration
public static void EatRestOfLine(this string content, ref int index)
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | index |
SafePeekAt(String, Int32)
View Source
Declaration
public static char SafePeekAt(this string content, int fromPos)
Returns
System.Char
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | fromPos |
IsAlphaNumeric(Char)
View Source
Declaration
public static bool IsAlphaNumeric(this char c)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Char | c |
GetNextAlphaNumericExpr(String, ref Int32)
View Source
Declaration
public static string GetNextAlphaNumericExpr(this string content, ref int fromPos)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | fromPos |
GetNextMemberExpr(String, ref Int32)
View Source
Declaration
public static string GetNextMemberExpr(this string content, ref int fromPos)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | content |
System.Int32 | fromPos |
RemoveAllWhiteSpace(String)
View Source
Declaration
public static string RemoveAllWhiteSpace(this string content)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | content |
GetVarName(String)
View Source
Declaration
public static string GetVarName(this string memberExpr)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | memberExpr |