Skip to main content

ScriptContextUtils

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class ScriptContextUtils

Fields

ErrorNoReturn

View Source
Declaration
public static string ErrorNoReturn

Methods

ThrowNoReturn()

View Source
Declaration
public static void ThrowNoReturn()

ShouldRethrow(Exception)

View Source
Declaration
public static bool ShouldRethrow(Exception e)
Returns

System.Boolean

Parameters
TypeName
System.Exceptione

HandleException(Exception, PageResult)

View Source
Declaration
public static Exception HandleException(Exception e, PageResult pageResult)
Returns

System.Exception

Parameters
TypeName
System.Exceptione
ServiceStack.Script.PageResultpageResult

EvaluateResult(PageResult, out Object)

View Source
Declaration
public static bool EvaluateResult(this PageResult pageResult, out object returnValue)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Script.PageResultpageResult
System.ObjectreturnValue

EvaluateResultAsync(PageResult)

View Source
Declaration
public static async Task<Tuple<bool, object>> EvaluateResultAsync(this PageResult pageResult)
Returns

System.Threading.Tasks.Task<System.Tuple<System.Boolean,System.Object>>

Parameters
TypeName
ServiceStack.Script.PageResultpageResult

RenderAsync(PageResult, Stream, CancellationToken)

View Source
Declaration
public static async Task RenderAsync(this PageResult pageResult, Stream stream, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Script.PageResultpageResult
System.IO.Streamstream
System.Threading.CancellationTokentoken

RenderToStream(PageResult, Stream)

View Source
Declaration
public static void RenderToStream(this PageResult pageResult, Stream stream)
Parameters
TypeName
ServiceStack.Script.PageResultpageResult
System.IO.Streamstream

RenderToStreamAsync(PageResult, Stream)

View Source
Declaration
public static async Task RenderToStreamAsync(this PageResult pageResult, Stream stream)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Script.PageResultpageResult
System.IO.Streamstream

RenderScript(PageResult)

View Source
Declaration
public static string RenderScript(this PageResult pageResult)
Returns

System.String

Parameters
TypeName
ServiceStack.Script.PageResultpageResult

RenderScriptAsync(PageResult, CancellationToken)

View Source
Declaration
public static async Task<string> RenderScriptAsync(this PageResult pageResult, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.String>

Parameters
TypeName
ServiceStack.Script.PageResultpageResult
System.Threading.CancellationTokentoken

CreateScope(ScriptContext, Dictionary<String, Object>, ScriptMethods, ScriptBlock)

View Source
Declaration
public static ScriptScopeContext CreateScope(this ScriptContext context, Dictionary<string, object> args = null, ScriptMethods functions = null, ScriptBlock blocks = null)
Returns

ServiceStack.Script.ScriptScopeContext

Parameters
TypeName
ServiceStack.Script.ScriptContextcontext
System.Collections.Generic.Dictionary<System.String,System.Object>args
ServiceStack.Script.ScriptMethodsfunctions
ServiceStack.Script.ScriptBlockblocks