Class ExpressionEvaluatorExtensions
Extension methods used with an IEvaluatesExpression.
Inheritance
System.Object
ExpressionEvaluatorExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Expressions
Assembly: ZptSharp.dll
Syntax
public static class ExpressionEvaluatorExtensions
Methods
| Improve this Doc View SourceEvaluateExpressionAsync<T>(IEvaluatesExpression, String, ExpressionContext, CancellationToken)
Evaluates the expression asynchronously and returns the result, with the returned value cast to a specified type.
Declaration
public static Task<T> EvaluateExpressionAsync<T>(this IEvaluatesExpression evaluator, string expression, ExpressionContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IEvaluatesExpression | evaluator | The expression evaluator. |
System.String | expression | The expression string. |
ExpressionContext | context | The expression context. |
System.Threading.CancellationToken | cancellationToken | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> | The expression result. |
Type Parameters
Name | Description |
---|---|
T | The desired/expected type of the result object. |