CaseValueItem

Overview

The CaseValueItem class is an element in a case expression. It consists of the possible values this element should trigger on, and the expression that should be triggered if the case condition matches those values. Note that the expression "1 .. 10" can be expressed as a new RangeValue(new DataValue(1), new DataValue(10)).

Location


Properties


Cases

Case condition

 

property Cases: List<Value> read;

 

List<Value> Cases { get; }

 

var Cases: List<Value> { get{} }

 

List<Value> Cases { __get; }

 

ReadOnly Property Cases() As List<Value>

Result

Result value if one of the cases matches the case condition

 

property Result: Value read write;

 

Value Result { get; set; }

 

var Result: Value { get{} set{} }

 

Value Result { __get; __set; }

 

Property Result() As Value

Instance Methods


constructor

Empty constructor

 

constructor

 

CaseValueItem()

 

init()

 

CaseValueItem()

 

Sub New()

constructor (Value, Value)

Constructor with a single case element

 

constructor(aCase: Value; aResult: Value)

 

CaseValueItem(Value aCase, Value aResult)

 

init(_ aCase: Value, _ aResult: Value)

 

CaseValueItem(Value aCase, Value aResult)

 

Sub New(aCase As Value, aResult As Value)

Parameters:

  • aCase: Case value
  • aResult: Value returned for this case

constructor (array of Value, Value)

Constructor with multiple case values

 

constructor(aCases: array of Value; aResult: Value)

 

CaseValueItem(Value[] aCases, Value aResult)

 

init(_ aCases: Value..., _ aResult: Value)

 

CaseValueItem(Value[] aCases, Value aResult)

 

Sub New(aCases As Value(), aResult As Value)

Parameters:

  • aCases: Case values
  • aResult: Value returned for this case