Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (62 sloc) 2.02 KB

API reference for Expression

For Nuget packages, see this MyGet feed

ExpressionEngine Class

Constructors

/// <summary>
/// Constructor
/// </summary>
/// <param name="lookup">If present delegate to lookup evaluation information from type string.</param>
public ExpressionEngine(EvaluatorLookup lookup = null)

Methods

/// <summary>
/// Parse the input into an expression.
/// </summary>
/// <param name="expression">Expression to parse.</param>
/// <returns>Expresion tree.</returns>
public Expression Parse(string expression)

Expression Class

Fields

/// <summary>
/// Type of expression.
/// </summary>
public string Type { get; }

/// <summary>
/// Evaluator of this expression
/// </summary>
public ExpressionEvaluator Evaluator { get; }

/// <summary>
/// Children expressions.
/// </summary>
public Expression[] Children { get; set; }

/// <summary>
/// Expected result of evaluating expression.
/// </summary>
public ReturnType ReturnType => Evaluator.ReturnType;

Contructor

/// <summary>
/// Expression constructor.
/// </summary>
/// <param name="type">Type of expression from <see cref="ExpressionType"/>.</param>
/// <param name="evaluator">Information about how to validate and evaluate expression.</param>
/// <param name="children">Child expressions.</param>
public Expression(string type, ExpressionEvaluator evaluator = null, params Expression[] children)

Methods

/// <summary>
/// Evaluate the expression.
/// </summary>
/// <param name="state">
/// Global state to evaluate accessor expressions against.  Can be <see cref="IDictionary{String}{Object}"/>, <see cref="IDictionary"/> otherwise reflection is used to access property and then indexer.
/// </param>
/// <returns>Computed value and an error string.  If the string is non-null, then there was an evaluation error.</returns>
public (object value, string error) TryEvaluate(object state)
You can’t perform that action at this time.