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
Type | Name |
---|---|
System.Exception | e |
HandleException(Exception, PageResult)
View Source
Declaration
public static Exception HandleException(Exception e, PageResult pageResult)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.Exception | e |
ServiceStack.Script.PageResult | pageResult |
EvaluateResult(PageResult, out Object)
View Source
Declaration
public static bool EvaluateResult(this PageResult pageResult, out object returnValue)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
System.Object | returnValue |
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
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
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
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
System.IO.Stream | stream |
System.Threading.CancellationToken | token |
RenderToStream(PageResult, Stream)
View Source
Declaration
public static void RenderToStream(this PageResult pageResult, Stream stream)
Parameters
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
System.IO.Stream | stream |
RenderToStreamAsync(PageResult, Stream)
View Source
Declaration
public static async Task RenderToStreamAsync(this PageResult pageResult, Stream stream)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
System.IO.Stream | stream |
RenderScript(PageResult)
View Source
Declaration
public static string RenderScript(this PageResult pageResult)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
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
Type | Name |
---|---|
ServiceStack.Script.PageResult | pageResult |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.Script.ScriptContext | context |
System.Collections.Generic.Dictionary<System.String,System.Object> | args |
ServiceStack.Script.ScriptMethods | functions |
ServiceStack.Script.ScriptBlock | blocks |