Skip to main content

ScriptCode

Inverse of the #Script Language Template Syntax where each line is a statement i.e. in contrast to #Script's default where text contains embedded template expressions {{ ... }}

Assembly: ServiceStack.Common.dll
View Source
Declaration
public sealed class ScriptCode : ScriptLanguage

Properties

Name

View Source
Declaration
public override string Name { get; }

Inherited Properties

LineComment

View Source
Declaration
public virtual string LineComment { get; }

Name

View Source
Declaration
public abstract string Name { get; }

Verbatim

View Source
Declaration
public static ScriptLanguage Verbatim { get; }

Fields

Language

View Source
Declaration
public static readonly ScriptLanguage Language

Methods

Parse(ScriptContext, ReadOnlyMemory<Char>, ReadOnlyMemory<Char>)

View Source
Declaration
public override List<PageFragment> Parse(ScriptContext context, ReadOnlyMemory<char> body, ReadOnlyMemory<char> modifiers)
Returns

System.Collections.Generic.List<ServiceStack.Script.PageFragment>

Parameters
TypeName
ServiceStack.Script.ScriptContextcontext
ReadOnlyMemory<System.Char>body
ReadOnlyMemory<System.Char>modifiers

WritePageFragmentAsync(ScriptScopeContext, PageFragment, CancellationToken)

View Source
Declaration
public override async Task<bool> WritePageFragmentAsync(ScriptScopeContext scope, PageFragment fragment, CancellationToken token)
Returns

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

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
ServiceStack.Script.PageFragmentfragment
System.Threading.CancellationTokentoken

WriteStatementAsync(ScriptScopeContext, JsStatement, CancellationToken)

View Source
Declaration
public override async Task<bool> WriteStatementAsync(ScriptScopeContext scope, JsStatement statement, CancellationToken token)
Returns

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

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
ServiceStack.Script.JsStatementstatement
System.Threading.CancellationTokentoken

Inherited Methods

Parse(ScriptContext, ReadOnlyMemory<Char>)

View Source
Declaration
public List<PageFragment> Parse(ScriptContext context, ReadOnlyMemory<char> body)
Returns

System.Collections.Generic.List<ServiceStack.Script.PageFragment>

Parameters
TypeName
ServiceStack.Script.ScriptContextcontext
ReadOnlyMemory<System.Char>body

Parse(ScriptContext, ReadOnlyMemory<Char>, ReadOnlyMemory<Char>)

View Source
Declaration
public abstract List<PageFragment> Parse(ScriptContext context, ReadOnlyMemory<char> body, ReadOnlyMemory<char> modifiers)
Returns

System.Collections.Generic.List<ServiceStack.Script.PageFragment>

Parameters
TypeName
ServiceStack.Script.ScriptContextcontext
ReadOnlyMemory<System.Char>body
ReadOnlyMemory<System.Char>modifiers

ParseVerbatimBlock(String, ReadOnlyMemory<Char>, ReadOnlyMemory<Char>)

View Source
Declaration
public virtual PageBlockFragment ParseVerbatimBlock(string blockName, ReadOnlyMemory<char> argument, ReadOnlyMemory<char> body)
Returns

ServiceStack.Script.PageBlockFragment

Parameters
TypeName
System.StringblockName
ReadOnlyMemory<System.Char>argument
ReadOnlyMemory<System.Char>body

UnwrapValue(Object)

View Source
Declaration
public static object UnwrapValue(object value)
Returns

System.Object

Parameters
TypeName
System.Objectvalue

WritePageFragmentAsync(ScriptScopeContext, PageFragment, CancellationToken)

View Source
Declaration
public virtual Task<bool> WritePageFragmentAsync(ScriptScopeContext scope, PageFragment fragment, CancellationToken token)
Returns

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

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
ServiceStack.Script.PageFragmentfragment
System.Threading.CancellationTokentoken

WriteStatementAsync(ScriptScopeContext, JsStatement, CancellationToken)

View Source
Declaration
public virtual Task<bool> WriteStatementAsync(ScriptScopeContext scope, JsStatement statement, CancellationToken token)
Returns

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

Parameters
TypeName
ServiceStack.Script.ScriptScopeContextscope
ServiceStack.Script.JsStatementstatement
System.Threading.CancellationTokentoken