ArrayExpression class

Represents a property which is either a value of array of T or a string expression to bind to a array of T.

Extends

Remarks

String values are always interpreted as an expression, whether it has '=' prefix or not.

Constructors

ArrayExpression(T[] | string | Expression)

Initializes a new instance of the ArrayExpression class.

Inherited Properties

expressionText

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

value

Gets or sets the raw value of the expression property.

Methods

setValue(T[] | string | Expression)

Set an array value.

Inherited Methods

getValue(object)

Get the value.

toExpression()

This will return the existing expression if the value is non-complex type.

toString()

Convert an expression property to string.

tryGetValue(object)

Try to Get the value.

Constructor Details

ArrayExpression(T[] | string | Expression)

Initializes a new instance of the ArrayExpression class.

new ArrayExpression(value?: T[] | string | Expression)

Parameters

value

T[] | string | Expression

Value of T[] or a string expression to bind to a T[].

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: T[]

Property Value

T[]

Inherited From ExpressionProperty.value

Method Details

setValue(T[] | string | Expression)

Set an array value.

function setValue(value: T[] | string | Expression)

Parameters

value

T[] | string | Expression

Value to set.

Inherited Method Details

getValue(object)

Get the value.

function getValue(data: object): T[]

Parameters

data

object

Data to use for expression binding.

Returns

T[]

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

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: T[] }

Parameters

data

object

Data to use for expression binding.

Returns

{ error: Error, value: T[] }

the value or an error.

Inherited From ExpressionProperty.tryGetValue