Show / Hide Table of Contents

Class RegistryBasedExpressionEvaluator

An implementation of IEvaluatesExpression which makes use of the registry pattern to select and delegate execution to another implementation (of the same interface). This selection occurs based upon the expression type.

Additionally, when delegating to an implementation of IEvaluatesExpression from the registry, any expression-type prefix upon the expression is removed before this delegation occurs.

Inheritance
System.Object
RegistryBasedExpressionEvaluator
Implements
IEvaluatesExpression
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 class RegistryBasedExpressionEvaluator : IEvaluatesExpression

Constructors

| Improve this Doc View Source

RegistryBasedExpressionEvaluator(IGetsExpressionType, IGetsEvaluatorForExpressionType, IRemovesPrefixFromExpression)

Initializes a new instance of the RegistryBasedExpressionEvaluator class.

Declaration
public RegistryBasedExpressionEvaluator(IGetsExpressionType typeProvider, IGetsEvaluatorForExpressionType evaluatorProvider, IRemovesPrefixFromExpression prefixRemover)
Parameters
Type Name Description
IGetsExpressionType typeProvider

Type provider.

IGetsEvaluatorForExpressionType evaluatorProvider

Evaluator provider.

IRemovesPrefixFromExpression prefixRemover

Prefix remover.

Methods

| Improve this Doc View Source

EvaluateExpressionAsync(String, ExpressionContext, CancellationToken)

Evaluates the expression asynchronously and returns the result.

Declaration
public Task<object> EvaluateExpressionAsync(string expression, ExpressionContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
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<System.Object>

The expression result.

Implements

IEvaluatesExpression

Extension Methods

ExpressionEvaluatorExtensions.EvaluateExpressionAsync<T>(IEvaluatesExpression, String, ExpressionContext, CancellationToken)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX