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
Type | Name |
---|---|
ReadOnlyMemory<System.Char> | expr |
ServiceStack.Script.ScriptScopeContext | scope |
System.Action | ifNone |
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
Type | Name |
---|---|
ReadOnlyMemory<System.Char> | expr |
ServiceStack.Script.ScriptScopeContext | scope |
System.Action | ifNone |
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
Type | Name |
---|---|
ReadOnlyMemory<System.Char> | expr |
ServiceStack.Script.ScriptScopeContext | scope |
System.Action | ifNone |
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
Type | Name |
---|---|
ReadOnlyMemory<System.Char> | expr |
ServiceStack.Script.ScriptScopeContext | scope |
System.Action | ifNone |
GetCachedJsExpression(ReadOnlyMemory<Char>, ScriptScopeContext)
View Source
Declaration
public static JsToken GetCachedJsExpression(this ReadOnlyMemory<char> expr, ScriptScopeContext scope)
Returns
Parameters
Type | Name |
---|---|
ReadOnlyMemory<System.Char> | expr |
ServiceStack.Script.ScriptScopeContext | scope |
GetCachedJsExpression(String, ScriptScopeContext)
View Source
Declaration
public static JsToken GetCachedJsExpression(this string expr, ScriptScopeContext scope)
Returns
Parameters
Type | Name |
---|---|
System.String | expr |
ServiceStack.Script.ScriptScopeContext | scope |
ParseJsExpression(String, out JsToken)
View Source
Declaration
public static ReadOnlySpan<char> ParseJsExpression(this string literal, out JsToken token)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|---|
System.String | literal |
ServiceStack.Script.JsToken | token |
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
Type | Name |
---|---|
ReadOnlySpan<System.Char> | literal |
ServiceStack.Script.JsToken | token |
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
Type | Name |
---|---|
ReadOnlyMemory<System.Char> | literal |
ServiceStack.Script.JsToken | token |
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
Type | Name |
---|---|
ReadOnlySpan<System.Char> | literal |
ServiceStack.Script.JsToken | token |
System.Boolean | filterExpression |
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
Type | Name |
---|---|
ReadOnlySpan<System.Char> | literal |
ServiceStack.Script.JsExpression | expr |
System.Boolean | filterExpression |
CreateJsExpression(JsToken, JsBinaryOperator, JsToken)
View Source
Declaration
public static JsExpression CreateJsExpression(JsToken lhs, JsBinaryOperator op, JsToken rhs)
Returns
ServiceStack.Script.JsExpression
Parameters
Type | Name |
---|---|
ServiceStack.Script.JsToken | lhs |
ServiceStack.Script.JsBinaryOperator | op |
ServiceStack.Script.JsToken | rhs |