Share via


TypeCoercionProvider.TryCoerceTo Method

Definition

Overloads

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, NumberValue)

Try to convert value to Number format.

TryCoerceTo(FormulaValue, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, RuntimeConfig, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, FormulaType, FormulaValue)
TryCoerceTo(FormulaValue, RuntimeConfig, CancellationToken, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, BooleanValue)

Try to convert value to Boolean format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, out Microsoft.PowerFx.Types.BooleanValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * BooleanValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, ByRef result As BooleanValue) As Boolean

Parameters

value
FormulaValue

Input value.

result
BooleanValue

Result value.

Returns

True/False based on whether function can convert from original type to Boolean type.

Applies to

TryCoerceTo(FormulaValue, DateTimeValue)

Try to convert value to DateTime format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, out Microsoft.PowerFx.Types.DateTimeValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * DateTimeValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, ByRef result As DateTimeValue) As Boolean

Parameters

value
FormulaValue

Input value.

result
DateTimeValue

Result value.

Returns

True/False based on whether function can convert from original type to DateTime type.

Applies to

TryCoerceTo(FormulaValue, DecimalValue)

Try to convert value to Number format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, out Microsoft.PowerFx.Types.DecimalValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * DecimalValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, ByRef result As DecimalValue) As Boolean

Parameters

value
FormulaValue

Input value.

result
DecimalValue

Result value.

Returns

True/False based on whether function can convert from original type to Number type.

Applies to

TryCoerceTo(FormulaValue, NumberValue)

Try to convert value to Number format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, out Microsoft.PowerFx.Types.NumberValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * NumberValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, ByRef result As NumberValue) As Boolean

Parameters

value
FormulaValue

Input value.

result
NumberValue

Result value.

Returns

True/False based on whether function can convert from original type to Number type.

Applies to

TryCoerceTo(FormulaValue, StringValue)

Try to convert value to String format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, out Microsoft.PowerFx.Types.StringValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * StringValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, ByRef result As StringValue) As Boolean

Parameters

value
FormulaValue

Input value.

result
StringValue

Result value.

Returns

True/False based on whether function can convert from original type to String type.

Applies to

TryCoerceTo(FormulaValue, RuntimeConfig, StringValue)

Try to convert value to String format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, Microsoft.PowerFx.RuntimeConfig runtimeConfig, out Microsoft.PowerFx.Types.StringValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * Microsoft.PowerFx.RuntimeConfig * StringValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, runtimeConfig As RuntimeConfig, ByRef result As StringValue) As Boolean

Parameters

value
FormulaValue

Input value.

runtimeConfig
RuntimeConfig

Runtime Config.

result
StringValue

Result value.

Returns

True/False based on whether function can convert from original type to String type.

Applies to

TryCoerceTo(FormulaValue, FormulaType, FormulaValue)

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, Microsoft.PowerFx.Types.FormulaType targetType, out Microsoft.PowerFx.Types.FormulaValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * Microsoft.PowerFx.Types.FormulaType * FormulaValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, targetType As FormulaType, ByRef result As FormulaValue) As Boolean

Parameters

value
FormulaValue
targetType
FormulaType
result
FormulaValue

Returns

Applies to

TryCoerceTo(FormulaValue, RuntimeConfig, CancellationToken, StringValue)

Try to convert value to String format.

public static bool TryCoerceTo(this Microsoft.PowerFx.Types.FormulaValue value, Microsoft.PowerFx.RuntimeConfig runtimeConfig, System.Threading.CancellationToken cancellationToken, out Microsoft.PowerFx.Types.StringValue result);
static member TryCoerceTo : Microsoft.PowerFx.Types.FormulaValue * Microsoft.PowerFx.RuntimeConfig * System.Threading.CancellationToken * StringValue -> bool
<Extension()>
Public Function TryCoerceTo (value As FormulaValue, runtimeConfig As RuntimeConfig, cancellationToken As CancellationToken, ByRef result As StringValue) As Boolean

Parameters

value
FormulaValue

Input value.

runtimeConfig
RuntimeConfig

Runtime Config.

cancellationToken
CancellationToken

Cancellation Token.

result
StringValue

Result value.

Returns

True/False based on whether function can convert from original type to String type.

Applies to