mirror of
https://github.com/esiur/esiur-dart.git
synced 2025-05-06 20:02:59 +00:00
50 lines
1.3 KiB
Dart
50 lines
1.3 KiB
Dart
import 'TestResource.dart';
|
|
|
|
void main() async {
|
|
try {
|
|
List<int> a = [2, 1, 2];
|
|
|
|
Map<Type, int> map = Map();
|
|
|
|
map[<int?>[].runtimeType] = 33;
|
|
|
|
print(map[a.runtimeType]);
|
|
|
|
print(a.runtimeType.toString());
|
|
|
|
print("Test");
|
|
} catch (ex) {
|
|
print("Error occured");
|
|
print(ex);
|
|
}
|
|
}
|
|
|
|
// // describe object
|
|
// desc(dynamic x) {
|
|
// if (x is List) {
|
|
// for (var i = 0; i < x.length; i++) desc(x[i]);
|
|
// } else if (x is DistributedResource) {
|
|
// var y = x.instance?.template;
|
|
// print("Fucntions = ${y.functions.length}\n");
|
|
// for (var i = 0; i < y.functions.length; i++) {
|
|
// print("Function ${y.functions[i].name} ${y.functions[i].expansion}");
|
|
// }
|
|
// print("------------------------------\n");
|
|
// print("Events = ${y.events.length}\n");
|
|
// for (var i = 0; i < y.events.length; i++) {
|
|
// print("Events ${y.events[i].name} ${y.events[i].expansion}");
|
|
// }
|
|
|
|
// print("------------------------------\n");
|
|
// print("Properties = ${y.properties.length}\n");
|
|
// for (var i = 0; i < y.properties.length; i++) {
|
|
// print(
|
|
// "Property ${y.properties[i].name} ${y.properties[i].readExpansion}");
|
|
// // recursion
|
|
// //print("value = ${desc(x.get(y.properties[i].index))}");
|
|
// }
|
|
// } else {
|
|
// print(x.toString());
|
|
// }
|
|
// }
|