DialogExpression class
Represents a property which is either a Dialog or a string expression for a dialogId.
- Extends
-
ExpressionProperty<Dialog>
Remarks
String values are always interpreted as a string with interpolation, unless it has '=' prefix or not. The result is interpreted as a resource Id or dialogId.
Constructors
Dialog |
Initializes a new instance of the DialogExpression class. |
Inherited Properties
expression |
Getes or sets the expression text to evaluate to get the value. |
value | Gets or sets the raw value of the expression property. |
Methods
set |
Sets the raw value of the expression property. |
Inherited Methods
get |
Get the value. |
to |
This will return the existing expression if the value is non-complex type. |
to |
Convert an expression property to string. |
try |
Try to Get the value. |
Constructor Details
DialogExpression(Dialog | string | Expression)
Initializes a new instance of the DialogExpression class.
new DialogExpression(value?: Dialog | string | Expression)
Parameters
- value
-
Dialog | string | Expression
Optional. A Dialog, a string
that is interpreted as a resource Id or dialogId, or an Expression.
Inherited Property Details
expressionText
Getes or sets the expression text to evaluate to get the value.
expressionText: string
Property Value
string
Inherited From ExpressionProperty.expressionText
value
Gets or sets the raw value of the expression property.
value: Dialog
Property Value
Dialog
Inherited From ExpressionProperty.value
Method Details
setValue(Dialog | string | Expression)
Sets the raw value of the expression property.
function setValue(value: Dialog | string | Expression)
Parameters
- value
-
Dialog | string | Expression
A Dialog, a string
that is interpreted as a resource Id or dialogId, or an Expression.
Inherited Method Details
getValue(object)
Get the value.
function getValue(data: object): Dialog
Parameters
- data
-
object
Data to use for expression binding.
Returns
Dialog
The value.
Remarks
An error will be thrown if value is an invalid expression.
Inherited From ExpressionProperty.getValue
toExpression()
This will return the existing expression if the value is non-complex type.
function toExpression(): Expression
Returns
Expression
The existing expression if the value is non-complex type.
Inherited From ExpressionProperty.toExpression
toString()
Convert an expression property to string.
function toString(): string
Returns
string
The converted string.
Inherited From ExpressionProperty.toString
tryGetValue(object)
Try to Get the value.
function tryGetValue(data: object): { error: Error, value: Dialog }
Parameters
- data
-
object
Data to use for expression binding.
Returns
{ error: Error, value: Dialog }
the value or an error.
Inherited From ExpressionProperty.tryGetValue