Freigeben über


PrimitiveValue<T> Class

Definition

Helper for non-aggregate values that are represented as a single .net object. See PrimitiveValueConversions for converting between a T and a FormulaType.

public abstract class PrimitiveValue<T> : Microsoft.PowerFx.Types.ValidFormulaValue
type PrimitiveValue<'T> = class
    inherit ValidFormulaValue
Public MustInherit Class PrimitiveValue(Of T)
Inherits ValidFormulaValue

Type Parameters

T
Inheritance
Derived

Fields

_value

Properties

CanShallowCopy (Inherited from FormulaValue)
Type (Inherited from FormulaValue)
Value

Methods

AsBoolean() (Inherited from FormulaValue)
AsDecimal() (Inherited from FormulaValue)
AsDouble() (Inherited from FormulaValue)
MaybeShallowCopy()

Before mutation operations, call MaybeShallowCopy() to make a copy of the value. For most values this is a no-op and will not make a copy. Only types which implement IMutationCopy will have the opportunity to provide a copy.

(Inherited from FormulaValue)
ToExpression()

Provides serialization. Return an expression that, when evaluated in the invariant locale, recreates an equivalent formula value, including its type. This may not be the same as the expression used to originally create this type.

(Inherited from FormulaValue)
ToExpression(StringBuilder, FormulaValueSerializerSettings) (Inherited from FormulaValue)
ToObject()
TryGetPrimitiveValue(Object) (Inherited from FormulaValue)
TryShallowCopy(FormulaValue) (Inherited from FormulaValue)
Visit(IValueVisitor) (Inherited from FormulaValue)

Extension Methods

CanCoerceToStringValue(FormulaValue)

Can convert value to String format or not.

TryCoerceTo(FormulaValue, RuntimeConfig, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, RuntimeConfig, CancellationToken, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, BooleanValue)

Try to convert value to Boolean format.

TryCoerceTo(FormulaValue, DateTimeValue)

Try to convert value to DateTime format.

TryCoerceTo(FormulaValue, DecimalValue)

Try to convert value to Number format.

TryCoerceTo(FormulaValue, FormulaType, FormulaValue)
TryCoerceTo(FormulaValue, NumberValue)

Try to convert value to Number format.

TryCoerceTo(FormulaValue, StringValue)

Try to convert value to String format.

Applies to