Test additional content header

Value Class

Provides the base class from which the domain specific numer-like classes types can be derived.

Definition

Namespace: Fluent.Calculations.Primitives.BaseTypes
Assembly: Fluent.Calculations.Primitives (in Fluent.Calculations.Primitives.dll) Version: 1.1.0-aplha
public abstract class Value : IValueProvider, 
	IValue
Inheritance
Object    Value
Derived
Implements
IValue, IValueProvider

Remarks

Number and Condition are built-in examples. Leverage this class to create other types specific to your domain. Learn more about implementing new tracable values.

Constructors

Value(MakeValueArgs) Initializes a new instance of the [!:Values] with provided values. Used in derived classes to initialize base class fields.
Value(Value) Initializes a new instance of the Value which is deep copy of the supplied value parameter.

Properties

ExpressionMetadata of expression that yielded this value.
NameName of value
OriginOrigin type of the value.
PrimitiveNumeric primitive representation of the value.
PrimitiveStringFormatted string representation of the primitive value.
ScopeNamed scope that this value is part of
TagsCustom tags associated with the value.
TypeOriginal type of the value implementation.

Methods

Equals(IValueProvider) Determines whether two Values are equal based on underlying primitive value.
Equals(Object)Determines whether two Values are equal based on underlying primitive value.
(Overrides ObjectEquals(Object))
GetHashCodeServes as the default hash function, returns hash of the Primitive property value. This function is a subject to future change.
(Overrides ObjectGetHashCode)
HandleBinaryOperationResultType, ResultPrimitiveType Handles math and comparison operations of underlying primitve values in derived types.
MakeDefaultInitializes a new instance with default values, equivalent to zero/null value.
MakeOfThisType Initializes a new instance of the derived value class. Used by the framework to create expected result types.
ToStringReturns a string that represents the current value.
(Overrides ObjectToString)

See Also