Show / Hide Table of Contents

Class PathExpressionRequestEvaluator

Implementation of IEvaluatesPathExpressionRequest which evaluates path expression requests.

Inheritance
System.Object
PathExpressionRequestEvaluator
Implements
IEvaluatesPathExpressionRequest
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.PathExpressions
Assembly: ZptSharp.dll
Syntax
public class PathExpressionRequestEvaluator : IEvaluatesPathExpressionRequest
Remarks

The main work done by this class is the parsing and splitting-up of the path expression into one or more PathExpression.AlternateExpression instances. Each of these is evaluated independently, in order, until either one succeeds in returning a result or until they have thrown an exception.

If an alternate expression returns a result then this is the result of the evaluation operation. If, on the other hand, we exhaust all of the alternate expressions and every one of them raises an exception, this the EvaluateAsync(PathExpressionEvaluationRequest, CancellationToken) method will itself raise an exception.

Constructors

| Improve this Doc View Source

PathExpressionRequestEvaluator(IGetsPathWalkingExpressionEvaluator, IParsesPathExpression)

Initializes a new instance of the PathExpressionRequestEvaluator class.

Declaration
public PathExpressionRequestEvaluator(IGetsPathWalkingExpressionEvaluator walkingEvaluatorFactory, IParsesPathExpression expressionParser)
Parameters
Type Name Description
IGetsPathWalkingExpressionEvaluator walkingEvaluatorFactory

Path-walking evaluator.

IParsesPathExpression expressionParser

Expression parser.

Methods

| Improve this Doc View Source

EvaluateAsync(PathExpressionEvaluationRequest, CancellationToken)

Evaluate the expression and return the result.

Declaration
public Task<object> EvaluateAsync(PathExpressionEvaluationRequest request, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
PathExpressionEvaluationRequest request

Request.

System.Threading.CancellationToken token

Token.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

The async.

Implements

IEvaluatesPathExpressionRequest
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX