Table of Contents

Class EvaluationVisitor

Namespace
NCalc.Visitors
Assembly
NCalc.Sync.dll

Class responsible to evaluating LogicalExpression objects into CLR objects.

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

Constructors

EvaluationVisitor(ExpressionContext)

Class responsible to evaluating LogicalExpression objects into CLR objects.

public EvaluationVisitor(ExpressionContext context)

Parameters

context ExpressionContext

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

OnEvaluateFunction(string, FunctionArgs)

protected void OnEvaluateFunction(string name, FunctionArgs args)

Parameters

name string
args FunctionArgs

OnEvaluateParameter(string, ParameterArgs)

protected void OnEvaluateParameter(string name, ParameterArgs args)

Parameters

name string
args ParameterArgs

Visit(BinaryExpression)

public object? Visit(BinaryExpression expression)

Parameters

expression BinaryExpression

Returns

object

Visit(Function)

public object? Visit(Function function)

Parameters

function Function

Returns

object

Visit(Identifier)

public object? Visit(Identifier identifier)

Parameters

identifier Identifier

Returns

object

Visit(LogicalExpressionList)

public object Visit(LogicalExpressionList list)

Parameters

list LogicalExpressionList

Returns

object

Visit(TernaryExpression)

public object? Visit(TernaryExpression expression)

Parameters

expression TernaryExpression

Returns

object

Visit(UnaryExpression)

public object? Visit(UnaryExpression expression)

Parameters

expression UnaryExpression

Returns

object

Visit(ValueExpression)

public object? Visit(ValueExpression expression)

Parameters

expression ValueExpression

Returns

object