public sealed class Value
A goal value. This is either a decimal numeric value, or a string representing an expression.

Properties

Coordinate

#
public (decimal x, decimal y) Coordinate { get; }
Gets the coordinate which drives this value.

Expression

#
public Expression Expression { get; }
Gets the expression (if any) which drives this value. If the text cannot be compiled, this will return an expression which always yields NaN.

Number

#
public decimal Number { get; }
Gets the number which drives this value. If this value is an expression, this will return decimal.MinValue.

Text

#
public string Text { get; }
Gets the text which describes this value.

Type

#
public ValueKind Type { get; }
Gets the type of this value.

Methods

Create

#
public static Value Create(string text)
Create either a numeric or an expression value.
text (string)

CreateCoordinate

#
public static Value CreateCoordinate(decimal x, decimal y)
Create a coordinate value.
x (decimal)
y (decimal)

CreateExpression

#
public static Value CreateExpression(Expression expression)
Create an expression value.
expression (Expression)

CreateNumber

#
public static Value CreateNumber(decimal value)
Create a numeric value.
value (decimal)

Convertors

OperationResultDescription
implicitdecimalValueStraight up cast from decimal to goal value.