Table of Contents

Class AsyncEvaluationVisitor

Namespace
NCalc.Visitors
Assembly
NCalc.Async.dll

Class responsible to asynchronous evaluating LogicalExpression objects into CLR objects.

public class AsyncEvaluationVisitor : ILogicalExpressionVisitor<ValueTask<object?>>
Inheritance
AsyncEvaluationVisitor
Implements
Inherited Members

Constructors

AsyncEvaluationVisitor(AsyncExpressionContext)

Class responsible to asynchronous evaluating LogicalExpression objects into CLR objects.

public AsyncEvaluationVisitor(AsyncExpressionContext context)

Parameters

context AsyncExpressionContext

Contextual parameters of the LogicalExpression, like custom functions and parameters.

Methods

Compare(object?, object?, ComparisonType)

protected bool Compare(object? a, object? b, ComparisonType comparisonType)

Parameters

a object
b object
comparisonType ComparisonType

Returns

bool

OnEvaluateFunctionAsync(string, AsyncFunctionArgs)

protected ValueTask OnEvaluateFunctionAsync(string name, AsyncFunctionArgs args)

Parameters

name string
args AsyncFunctionArgs

Returns

ValueTask

OnEvaluateParameterAsync(string, AsyncParameterArgs)

protected ValueTask OnEvaluateParameterAsync(string name, AsyncParameterArgs args)

Parameters

name string
args AsyncParameterArgs

Returns

ValueTask

Visit(BinaryExpression)

public ValueTask<object?> Visit(BinaryExpression expression)

Parameters

expression BinaryExpression

Returns

ValueTask<object>

Visit(Function)

public ValueTask<object?> Visit(Function function)

Parameters

function Function

Returns

ValueTask<object>

Visit(Identifier)

public ValueTask<object?> Visit(Identifier identifier)

Parameters

identifier Identifier

Returns

ValueTask<object>

Visit(LogicalExpressionList)

public ValueTask<object?> Visit(LogicalExpressionList list)

Parameters

list LogicalExpressionList

Returns

ValueTask<object>

Visit(TernaryExpression)

public ValueTask<object?> Visit(TernaryExpression expression)

Parameters

expression TernaryExpression

Returns

ValueTask<object>

Visit(UnaryExpression)

public ValueTask<object?> Visit(UnaryExpression expression)

Parameters

expression UnaryExpression

Returns

ValueTask<object>

Visit(ValueExpression)

public ValueTask<object?> Visit(ValueExpression expression)

Parameters

expression ValueExpression

Returns

ValueTask<object>