Skip to main content

JsExpressionUtils

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

Methods

GetJsExpressionAndEvaluate(ReadOnlyMemory<Char>, ScriptScopeContext, Action)

View Source
Declaration
public static object GetJsExpressionAndEvaluate(this ReadOnlyMemory<char> expr, ScriptScopeContext scope, Action ifNone = null)
Returns

System.Object

Parameters
TypeName
ReadOnlyMemory<System.Char>expr
ServiceStack.Script.ScriptScopeContextscope
System.ActionifNone

GetJsExpressionAndEvaluateAsync(ReadOnlyMemory<Char>, ScriptScopeContext, Action)

View Source
Declaration
public static async Task<object> GetJsExpressionAndEvaluateAsync(this ReadOnlyMemory<char> expr, ScriptScopeContext scope, Action ifNone = null)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ReadOnlyMemory<System.Char>expr
ServiceStack.Script.ScriptScopeContextscope
System.ActionifNone

GetJsExpressionAndEvaluateToBool(ReadOnlyMemory<Char>, ScriptScopeContext, Action)

View Source
Declaration
public static bool GetJsExpressionAndEvaluateToBool(this ReadOnlyMemory<char> expr, ScriptScopeContext scope, Action ifNone = null)
Returns

System.Boolean

Parameters
TypeName
ReadOnlyMemory<System.Char>expr
ServiceStack.Script.ScriptScopeContextscope
System.ActionifNone

GetJsExpressionAndEvaluateToBoolAsync(ReadOnlyMemory<Char>, ScriptScopeContext, Action)

View Source
Declaration
public static Task<bool> GetJsExpressionAndEvaluateToBoolAsync(this ReadOnlyMemory<char> expr, ScriptScopeContext scope, Action ifNone = null)
Returns

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

Parameters
TypeName
ReadOnlyMemory<System.Char>expr
ServiceStack.Script.ScriptScopeContextscope
System.ActionifNone

GetCachedJsExpression(ReadOnlyMemory<Char>, ScriptScopeContext)

View Source
Declaration
public static JsToken GetCachedJsExpression(this ReadOnlyMemory<char> expr, ScriptScopeContext scope)
Returns

ServiceStack.Script.JsToken

Parameters
TypeName
ReadOnlyMemory<System.Char>expr
ServiceStack.Script.ScriptScopeContextscope

GetCachedJsExpression(String, ScriptScopeContext)

View Source
Declaration
public static JsToken GetCachedJsExpression(this string expr, ScriptScopeContext scope)
Returns

ServiceStack.Script.JsToken

Parameters
TypeName
System.Stringexpr
ServiceStack.Script.ScriptScopeContextscope

ParseJsExpression(String, out JsToken)

View Source
Declaration
public static ReadOnlySpan<char> ParseJsExpression(this string literal, out JsToken token)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
System.Stringliteral
ServiceStack.Script.JsTokentoken

ParseJsExpression(ReadOnlySpan<Char>, out JsToken)

View Source
Declaration
public static ReadOnlySpan<char> ParseJsExpression(this ReadOnlySpan<char> literal, out JsToken token)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>literal
ServiceStack.Script.JsTokentoken

ParseJsExpression(ReadOnlyMemory<Char>, out JsToken)

View Source
Declaration
public static ReadOnlySpan<char> ParseJsExpression(this ReadOnlyMemory<char> literal, out JsToken token)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlyMemory<System.Char>literal
ServiceStack.Script.JsTokentoken

ParseJsExpression(ReadOnlySpan<Char>, out JsToken, Boolean)

View Source
Declaration
public static ReadOnlySpan<char> ParseJsExpression(this ReadOnlySpan<char> literal, out JsToken token, bool filterExpression)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>literal
ServiceStack.Script.JsTokentoken
System.BooleanfilterExpression

ParseBinaryExpression(ReadOnlySpan<Char>, out JsExpression, Boolean)

View Source
Declaration
public static ReadOnlySpan<char> ParseBinaryExpression(this ReadOnlySpan<char> literal, out JsExpression expr, bool filterExpression)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>literal
ServiceStack.Script.JsExpressionexpr
System.BooleanfilterExpression

CreateJsExpression(JsToken, JsBinaryOperator, JsToken)

View Source
Declaration
public static JsExpression CreateJsExpression(JsToken lhs, JsBinaryOperator op, JsToken rhs)
Returns

ServiceStack.Script.JsExpression

Parameters
TypeName
ServiceStack.Script.JsTokenlhs
ServiceStack.Script.JsBinaryOperatorop
ServiceStack.Script.JsTokenrhs