FunctionReference constructor
FunctionReference({
- required List<
CandidType> in_types, - required List<
CandidType> out_types, - bool isQuery = false,
- bool isOneWay = false,
- ServiceReference? service,
- Text? method_name,
- bool isTypeStance = false,
Implementation
FunctionReference({required this.in_types, required this.out_types, this.isQuery=false, this.isOneWay=false, this.service, this.method_name, this.isTypeStance=false}) {
for (List<CandidType> types_list in [in_types, out_types]) {
for (CandidType typestance in types_list) {
if (typestance.isTypeStance==false) {
throw Exception('CandidType: FunctionReference in_types & out_types lists needs each type-stance/finition with the isTypeStance=true, since these are the type-finitions for the function, not values.');
}
}
}
if ( (this.service != null && this.method_name == null) || (this.service == null && this.method_name != null)) {
throw Exception('CandidType: FunctionReference service and method_name must be given both together or both null.');
}
if (this.isTypeStance==true && this.service != null) {
throw Exception('CandidType: FunctionReference service & method_name must be null when isTypeStance==true');
}
}