Jaa


StringExpression Class

Definition

StringExpression - represents a property which is either a string value or a string expression.

public class StringExpression : AdaptiveExpressions.Properties.ExpressionProperty<string>
type StringExpression = class
    inherit ExpressionProperty<string>
Public Class StringExpression
Inherits ExpressionProperty(Of String)
Inheritance
StringExpression

Remarks

If the value is * a string with '=' prefix then the string is treated as an expression to resolve to a string. * a string without '=' then value is treated as string with string interpolation. * You can escape the '=' prefix by putting a backslash. Examples: prop = "Hello ${user.name}" => "Hello Joe" prop = "=length(user.name)" => "3" prop = "=user.name" => "Joe" prop = "\=user" => "=user".

Constructors

StringExpression()

Initializes a new instance of the StringExpression class.

StringExpression(Expression)

Initializes a new instance of the StringExpression class.

StringExpression(Func<Object,Object>)

Initializes a new instance of the StringExpression class.

StringExpression(JToken)

Initializes a new instance of the StringExpression class.

StringExpression(String)

Initializes a new instance of the StringExpression class.

Properties

ExpressionText

Gets or sets the expression text to evaluate to get the value.

(Inherited from ExpressionProperty<T>)
Value

Gets or sets the raw value of the expression property.

(Inherited from ExpressionProperty<T>)

Methods

ConvertObject(Object)

Convert raw object to desired value type.

(Inherited from ExpressionProperty<T>)
GetObject(Object)

Get value as object.

(Inherited from ExpressionProperty<T>)
GetValue(Object)

Get the value.

(Inherited from ExpressionProperty<T>)
SetObject(Object)

Set value as object.

(Inherited from ExpressionProperty<T>)
SetValue(Object)

Sets the value.

ToExpression()

This will return the existing expression or ConstantExpression(Value) if the value is non-complex type.

(Inherited from ExpressionProperty<T>)
ToString()

Returns a string that represents the current object.

(Inherited from ExpressionProperty<T>)
TryGetObject(Object)

Try Get value as object.

(Inherited from ExpressionProperty<T>)
TryGetValue(Object)

Try to Get the value.

(Inherited from ExpressionProperty<T>)

Operators

Implicit(Expression to StringExpression)

Converts an Expression instance to a StringExpression instance.

Implicit(JToken to StringExpression)

Converts a JSON Token to a StringExpression instance.

Implicit(String to StringExpression)

Converts a string value to a StringExpression instance.

Extension Methods

GetValueAsync(StringExpression, DialogContext, CancellationToken)

Gets a value from a string expression, using a TextTemplate.

Applies to