summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2020-01-14 17:17:04 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2020-01-14 17:17:05 +0900
commitae30d3c57bc28bddd9e3a6c18163719fd8958f06 (patch)
tree094665590e1f799fecf6418b472739c09da8fd6a
parente894c9bff8b1a0a7c2e6b18a9e0b0f707400eee4 (diff)
eina_mono: replace eina_list and eina_array with IList
Summary: Eina.List<T> => System.Collections.Generic.IList<T> Eina.Array<T> => System.Collections.Generic.IList<T> ref T8486 Depends On D10785 Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true Reviewers: felipealmeida, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8486, T8488 Differential Revision: https://phab.enlightenment.org/D10902
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh29
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh138
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh31
-rw-r--r--src/bin/eolian_mono/eolian/mono/type_impl.hh4
-rw-r--r--src/bindings/mono/efl_mono/efl_csharp_application.cs3
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs98
-rw-r--r--src/tests/efl_mono/Eina.cs197
-rw-r--r--src/tests/efl_mono/Events.cs6
-rw-r--r--src/tests/efl_mono/StructHelpers.cs15
9 files changed, 280 insertions, 241 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index 2acfcbb4b5..7405f8c2e1 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -139,6 +139,10 @@ struct unpack_event_args_visitor
139 return as_generator("Efl.Eo.Globals.IteratorTo" << eolian_mono::type << "(info)").generate(sink, type, *context); 139 return as_generator("Efl.Eo.Globals.IteratorTo" << eolian_mono::type << "(info)").generate(sink, type, *context);
140 else if (types.outer.base_type == "accessor") 140 else if (types.outer.base_type == "accessor")
141 return as_generator("Efl.Eo.Globals.AccessorTo" << eolian_mono::type << "(info)").generate(sink, type, *context); 141 return as_generator("Efl.Eo.Globals.AccessorTo" << eolian_mono::type << "(info)").generate(sink, type, *context);
142 else if (types.outer.base_type == "array")
143 return as_generator("Efl.Eo.Globals.NativeArrayTo" << eolian_mono::type << "(info)").generate(sink, type, *context);
144 else if (types.outer.base_type == "list")
145 return as_generator("Efl.Eo.Globals.NativeListTo" << eolian_mono::type << "(info)").generate(sink, type, *context);
142 else 146 else
143 return as_generator("new " << eolian_mono::type << "(info, false, false)").generate(sink, type, *context); 147 return as_generator("new " << eolian_mono::type << "(info, false, false)").generate(sink, type, *context);
144 } 148 }
@@ -229,19 +233,28 @@ struct pack_event_info_and_call_visitor
229 return as_generator( 233 return as_generator(
230 indent.inc() << "Contract.Requires(e != null, nameof(e));\n" 234 indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
231 << indent.inc() << "IntPtr info = e.arg.NativeHandle;\n" 235 << indent.inc() << "IntPtr info = e.arg.NativeHandle;\n"
232 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" 236 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n"
233 ).generate(sink, attributes::unused, *context); 237 ).generate(sink, attributes::unused, *context);
234 } 238 }
235 bool operator()(attributes::complex_type_def const& type) const 239 bool operator()(attributes::complex_type_def const& type) const
236 { 240 {
237 auto const& indent = current_indentation(*context); 241 auto const& indent = current_indentation(*context);
238 if ((type.outer.base_type == "iterator") || (type.outer.base_type == "accessor")) 242 bool is_own = type.outer.base_qualifier & attributes::qualifier_info::is_own;
239 return true; 243 std::string info_variable;
240 244
241 return as_generator( 245 if (type.outer.base_type == "iterator")
242 indent.inc() << "Contract.Requires(e != null, nameof(e));\n" 246 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToIterator(e.arg, ") + (is_own ? "true" : "false") + ");\n";
243 << indent.inc() << "IntPtr info = e.arg.Handle;\n" 247 else if (type.outer.base_type == "accessor")
244 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" 248 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToAccessor(e.arg, ") + (is_own ? "true" : "false") + ");\n";
249 else if (type.outer.base_type == "array")
250 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeArray(e.arg, ") + (is_own ? "true" : "false") + ");\n";
251 else if (type.outer.base_type == "list")
252 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeList(e.arg, ") + (is_own ? "true" : "false") + ");\n";
253 else
254 info_variable = "IntPtr info = e.arg.Handle;\n";
255 return as_generator(indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
256 << indent.inc() << info_variable
257 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n"
245 ).generate(sink, attributes::unused, *context); 258 ).generate(sink, attributes::unused, *context);
246 } 259 }
247}; 260};
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index 91b29afdc1..824dc0c927 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -625,20 +625,27 @@ struct native_convert_in_variable_generator
625 << ");\n" 625 << ");\n"
626 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context); 626 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
627 } 627 }
628 else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *" 628 else if (param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *")
629 || param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *"
630 )
631 { 629 {
632 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 630 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
633 if (!complex) 631 if (!complex)
634 return false; 632 return false;
635 return as_generator( 633 return as_generator(
636 "var " << string << " = new " << type << "(" << escape_keyword(param.param_name) 634 "var " << string << " = Efl.Eo.Globals.NativeListTo" << type << "(" << escape_keyword(param.param_name)
637 << ", " << (param.type.has_own ? "true" : "false")
638 << ", " << (complex->subtypes.front().is_value_type || complex->subtypes.front().has_own ? "true" : "false")
639 << ");\n" 635 << ");\n"
640 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context); 636 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
641 } 637 }
638 else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *")
639 {
640 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
641 if (!complex)
642 return false;
643 return as_generator(
644 "var " << string << " = Efl.Eo.Globals.NativeArrayTo" << type << "(" << escape_keyword(param.param_name)
645 << ");\n"
646 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
647 }
648
642 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *") 649 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *")
643 { 650 {
644 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 651 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
@@ -729,29 +736,25 @@ struct convert_in_variable_generator
729 ).generate(sink, attributes::unused, context)) 736 ).generate(sink, attributes::unused, context))
730 return false; 737 return false;
731 } 738 }
732 else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *" 739 else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *")
733 || param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *"
734 )
735 { 740 {
736 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 741 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
737 if (!complex) 742 if (!complex)
738 return false; 743 return false;
739 if (!as_generator( 744 if (!as_generator(
740 "Contract.Requires(" << string << " != null, nameof(" << string << "));\n" 745 "var " << string << " = " << "Efl.Eo.Globals.IListToNativeArray(" << escape_keyword(param.param_name) << ", " << (param.type.has_own ? "true" : "false") << ");\n"
741 << "var " << string << " = " << string << ".Handle;\n" 746 ).generate(sink, in_variable_name(param.param_name), context))
742 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), escape_keyword(param.param_name),
743 in_variable_name(param.param_name), escape_keyword(param.param_name))
744 , context))
745 return false; 747 return false;
746 if (param.type.has_own && !as_generator( 748 }
747 escape_keyword(param.param_name) << ".Own = false;\n" 749 else if (param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *")
748 ).generate(sink, attributes::unused, context)) 750 {
751 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
752 if (!complex)
749 return false; 753 return false;
750 754 auto var_name = in_variable_name(param.param_name);
751 if ((param.type.has_own && (complex->subtypes.front().is_value_type || complex->subtypes.front().has_own)) 755 if (!as_generator(
752 && !as_generator( 756 "var " << string << " = " << "Efl.Eo.Globals.IListToNativeList(" << escape_keyword(param.param_name) << ", " << (param.type.has_own ? "true" : "false") << ");\n"
753 escape_keyword(param.param_name) << ".OwnContent = false;\n" 757 ).generate(sink, var_name, context))
754 ).generate(sink, attributes::unused, context))
755 return false; 758 return false;
756 } 759 }
757 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *") 760 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *")
@@ -999,7 +1002,17 @@ struct convert_out_assign_generator
999 || param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT) 1002 || param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT)
1000 || param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT) 1003 || param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
1001 || param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT) 1004 || param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT)
1002 || param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT) 1005 )
1006 {
1007 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1008 if (!complex)
1009 return false;
1010 return as_generator(
1011 string << " = Efl.Eo.Globals.NativeArrayTo" << type << "(" << string
1012 << ");\n"
1013 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context);
1014 }
1015 else if (param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
1003 || param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT) 1016 || param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
1004 || param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT) 1017 || param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
1005 || param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT) 1018 || param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
@@ -1009,9 +1022,7 @@ struct convert_out_assign_generator
1009 if (!complex) 1022 if (!complex)
1010 return false; 1023 return false;
1011 return as_generator( 1024 return as_generator(
1012 string << " = new " << type << "(" << string 1025 string << " = Efl.Eo.Globals.NativeListTo" << type << "(" << string
1013 << ", " << (param.type.has_own ? "true" : "false")
1014 << ", " << (param.type.has_own && (complex->subtypes.front().is_value_type || complex->subtypes.front().has_own) ? "true" : "false")
1015 << ");\n" 1026 << ");\n"
1016 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context); 1027 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context);
1017 } 1028 }
@@ -1084,6 +1095,17 @@ struct convert_in_ptr_assign_generator
1084 string << " = " << in_variable_name(param.param_name) << ";\n" 1095 string << " = " << in_variable_name(param.param_name) << ";\n"
1085 ).generate(sink, escape_keyword(param.param_name), context); 1096 ).generate(sink, escape_keyword(param.param_name), context);
1086 } 1097 }
1098 else if (param_is_acceptable(param, "Eina_Array *", WANT_OWN, !WANT_OUT)
1099 || param_is_acceptable(param, "Eina_Array *", !WANT_OWN, !WANT_OUT)
1100 || param_is_acceptable(param, "const Eina_Array *", WANT_OWN, !WANT_OUT)
1101 || param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, !WANT_OUT)
1102 )
1103 {
1104 return as_generator(
1105 scope_tab(2) << lit("Efl.Eo.Globals.UpdateListFromNativeArray(") << escape_keyword(param.param_name) << ", " << in_variable_name(param.param_name) << ");\n"
1106 ).generate(sink, attributes::unused, context);
1107 }
1108
1087 1109
1088 return true; 1110 return true;
1089 } 1111 }
@@ -1141,17 +1163,23 @@ struct convert_return_generator
1141 .generate(sink, ret_type, context)) 1163 .generate(sink, ret_type, context))
1142 return false; 1164 return false;
1143 } 1165 }
1144 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *" 1166 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *")
1145 || ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *"
1146 )
1147 { 1167 {
1148 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type); 1168 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
1149 if (!complex) 1169 if (!complex)
1150 return false; 1170 return false;
1151 if (!as_generator("return new " << type << "(_ret_var, " << std::string{ret_type.has_own ? "true" : "false"} 1171
1152 << ", " << (ret_type.has_own && (complex->subtypes.front().is_value_type || complex->subtypes.front().has_own) ? "true" : "false") 1172 if (!as_generator("return Efl.Eo.Globals.NativeArrayTo" << type << "(_ret_var);")
1153 << ");\n") 1173 .generate(sink, ret_type, context))
1154 .generate(sink, ret_type, context)) 1174 return false;
1175 }
1176 else if (ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *")
1177 {
1178 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
1179 if (!complex)
1180 return false;
1181 if (!as_generator("return Efl.Eo.Globals.NativeListTo" << type << "(_ret_var);")
1182 .generate(sink, ret_type, context))
1155 return false; 1183 return false;
1156 } 1184 }
1157 else if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *") 1185 else if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *")
@@ -1274,30 +1302,30 @@ struct native_convert_out_assign_generator
1274 else if (param_is_acceptable(param, "Eina_Array *", WANT_OWN, WANT_OUT) 1302 else if (param_is_acceptable(param, "Eina_Array *", WANT_OWN, WANT_OUT)
1275 || param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT) 1303 || param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT)
1276 || param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT) 1304 || param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
1277 || param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT) 1305 || param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT))
1278 || param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
1279 || param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
1280 || param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
1281 || param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
1282 )
1283 { 1306 {
1284 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 1307 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1285 if (!complex) 1308 if (!complex)
1286 return false; 1309 return false;
1287 auto outvar = out_variable_name(param.param_name); 1310 auto outvar = out_variable_name(param.param_name);
1288 if (!as_generator( 1311 if (!as_generator(
1289 string << " = " << string << ".Handle;\n" 1312 string << " = Efl.Eo.Globals.IListToNativeArray(" << string << ", " << (param.type.has_own ? "true" : "false")<< ");\n"
1290 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), outvar), context)) 1313 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), outvar), context))
1291 return false; 1314 return false;
1292 if (param.type.has_own && !as_generator( 1315 }
1293 string << ".Own = false;\n" 1316 else if (param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
1294 ).generate(sink, outvar, context)) 1317 || param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
1318 || param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
1319 || param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT))
1320 {
1321 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1322 if (!complex)
1295 return false; 1323 return false;
1296 1324
1297 if ((param.type.has_own && (complex->subtypes.front().is_value_type && complex->subtypes.front().has_own)) 1325 auto outvar = out_variable_name(param.param_name);
1298 && !as_generator( 1326 if (!as_generator(
1299 string << ".OwnContent = false;\n" 1327 string << " = Efl.Eo.Globals.IListToNativeList(" << string << ", " << (param.type.has_own ? "true" : "false")<<");\n"
1300 ).generate(sink, outvar, context)) 1328 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), outvar), context))
1301 return false; 1329 return false;
1302 } 1330 }
1303 else if (param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT) 1331 else if (param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
@@ -1439,18 +1467,22 @@ struct native_convert_return_generator
1439 return as_generator("return _ret_var.Handle;") 1467 return as_generator("return _ret_var.Handle;")
1440 .generate(sink, attributes::unused, context); 1468 .generate(sink, attributes::unused, context);
1441 } 1469 }
1442 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *" 1470 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *")
1443 || ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *"
1444 )
1445 { 1471 {
1446 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type); 1472 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
1447 if (!complex) 1473 if (!complex)
1448 return false; 1474 return false;
1449 if (ret_type.has_own && !as_generator("_ret_var.Own = false; ") 1475
1450 .generate(sink, attributes::unused, context)) 1476 return as_generator(lit("return Efl.Eo.Globals.IListToNativeArray(_ret_var, ") << (ret_type.has_own ? "true" : "false") << ");")
1477 .generate(sink, attributes::unused, context);
1478 }
1479 else if (ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *")
1480 {
1481 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
1482 if (!complex)
1451 return false; 1483 return false;
1452 1484
1453 return as_generator("return _ret_var.Handle;") 1485 return as_generator(lit("return Efl.Eo.Globals.IListToNativeList(_ret_var, ") << (ret_type.has_own ? "true" : "false") << ");")
1454 .generate(sink, attributes::unused, context); 1486 .generate(sink, attributes::unused, context);
1455 } 1487 }
1456 else if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *") 1488 else if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *")
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 24d0ff34ca..176b5518d7 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -69,6 +69,20 @@ struct to_internal_field_convert_generator
69 .generate(sink, std::make_tuple(field_name, field_name), context)) 69 .generate(sink, std::make_tuple(field_name, field_name), context))
70 return false; 70 return false;
71 } 71 }
72 else if ((complex && (complex->outer.base_type == "array")))
73 {
74 if (!as_generator(
75 indent << scope_tab << scope_tab << "_internal_struct." << string << " = Efl.Eo.Globals.IListToNativeArray(_external_struct." << string << ", " << (field.type.has_own ? "true" : "false") << ");\n")
76 .generate(sink, std::make_tuple(field_name, field_name), context))
77 return false;
78 }
79 else if ((complex && (complex->outer.base_type == "list")))
80 {
81 if (!as_generator(
82 indent << scope_tab << scope_tab << "_internal_struct." << string << " = Efl.Eo.Globals.IListToNativeList(_external_struct." << string << ", " << (field.type.has_own ? "true" : "false") << ");\n")
83 .generate(sink, std::make_tuple(field_name, field_name), context))
84 return false;
85 }
72 else if ((complex && (complex->outer.base_type == "iterator"))) 86 else if ((complex && (complex->outer.base_type == "iterator")))
73 { 87 {
74 if (!as_generator( 88 if (!as_generator(
@@ -76,9 +90,7 @@ struct to_internal_field_convert_generator
76 .generate(sink, std::make_tuple(field_name, field_name), context)) 90 .generate(sink, std::make_tuple(field_name, field_name), context))
77 return false; 91 return false;
78 } 92 }
79 else if ((complex && (complex->outer.base_type == "array" 93 else if ((complex && (complex->outer.base_type == "hash"))
80 || complex->outer.base_type == "list"
81 || complex->outer.base_type == "hash"))
82 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") 94 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *")
83 { 95 {
84 // Always assumes pointer 96 // Always assumes pointer
@@ -193,12 +205,19 @@ struct to_external_field_convert_generator
193 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 205 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
194 return false; 206 return false;
195 } 207 }
196 else if (complex && (complex->outer.base_type == "array" 208 else if (complex && (complex->outer.base_type == "array"))
197 || complex->outer.base_type == "list")) 209 {
210 // Always assumes pointer
211 if (!as_generator(
212 indent << scope_tab << scope_tab << "_external_struct." << string << " = Efl.Eo.Globals.NativeArrayTo" << type << "(_internal_struct." << string << ");\n")
213 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
214 return false;
215 }
216 else if (complex && (complex->outer.base_type == "list"))
198 { 217 {
199 // Always assumes pointer 218 // Always assumes pointer
200 if (!as_generator( 219 if (!as_generator(
201 indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false, false);\n") 220 indent << scope_tab << scope_tab << "_external_struct." << string << " = Efl.Eo.Globals.NativeListTo" << type << "(_internal_struct." << string << ");\n")
202 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 221 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
203 return false; 222 return false;
204 } 223 }
diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh
index f365a0d5a8..4475844e2d 100644
--- a/src/bin/eolian_mono/eolian/mono/type_impl.hh
+++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh
@@ -368,13 +368,13 @@ struct visitor_generate
368 {"list", nullptr, nullptr, [&] 368 {"list", nullptr, nullptr, [&]
369 { 369 {
370 complex_type_def c = complex; 370 complex_type_def c = complex;
371 c.outer.base_type = "Eina.List"; 371 c.outer.base_type = "IList";
372 return c; 372 return c;
373 }} 373 }}
374 , {"array", nullptr, nullptr, [&] 374 , {"array", nullptr, nullptr, [&]
375 { 375 {
376 complex_type_def c = complex; 376 complex_type_def c = complex;
377 c.outer.base_type = "Eina.Array"; 377 c.outer.base_type = "IList";
378 return c; 378 return c;
379 }} 379 }}
380 , {"hash", nullptr, nullptr 380 , {"hash", nullptr, nullptr
diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs
index 8493abd6ab..9c2f7f0f06 100644
--- a/src/bindings/mono/efl_mono/efl_csharp_application.cs
+++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs
@@ -198,7 +198,7 @@ public abstract class Application
198 { 198 {
199 Init(components); 199 Init(components);
200 Efl.App app = Efl.App.AppMain; 200 Efl.App app = Efl.App.AppMain;
201 var command_line = new Eina.Array<Eina.Stringshare>(); 201 var command_line = new List<Eina.Stringshare>();
202 //command_line.Add(List.ConvertAll(Environment.GetCommandLineArgs(), s => (Eina.Stringshare)s)); 202 //command_line.Add(List.ConvertAll(Environment.GetCommandLineArgs(), s => (Eina.Stringshare)s));
203 //command_line.AddRange(Environment.GetCommandLineArgs()); 203 //command_line.AddRange(Environment.GetCommandLineArgs());
204#if EFL_BETA 204#if EFL_BETA
@@ -234,7 +234,6 @@ public abstract class Application
234 OnTerminate(); 234 OnTerminate();
235 }; 235 };
236 app.Begin(); 236 app.Begin();
237 command_line.Dispose();
238 Shutdown(); 237 Shutdown();
239 } 238 }
240} 239}
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index 2a8ebf0620..780735fcca 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -875,33 +875,107 @@ internal static class Globals
875 return ret; 875 return ret;
876 } 876 }
877 877
878 internal static IEnumerable<T> ListToIEnumerable<T>(IntPtr list) 878 internal static IList<T> NativeListToIList<T>(IntPtr nativeList)
879 { 879 {
880 if (list == IntPtr.Zero) 880 if (nativeList == IntPtr.Zero)
881 throw new ArgumentException("list is null", nameof(list)); 881 throw new ArgumentException("nativeList is null", nameof(nativeList));
882 882
883 IntPtr l; 883 IntPtr l;
884 884 List<T> list = new List<T>();
885 for (l = list; l != IntPtr.Zero; l = Eina.ListNativeFunctions.eina_list_next_custom_export_mono(l)) 885 for (l = nativeList; l != IntPtr.Zero; l = Eina.ListNativeFunctions.eina_list_next_custom_export_mono(l))
886 { 886 {
887 yield return Eina.TraitFunctions.NativeToManaged<T>(Eina.ListNativeFunctions.eina_list_data_get_custom_export_mono(l)); 887 list.Add(Eina.TraitFunctions.NativeToManaged<T>(Eina.ListNativeFunctions.eina_list_data_get_custom_export_mono(l)));
888 } 888 }
889 return list;
889 } 890 }
890 891
891 internal static IntPtr IEnumerableToList<T>(IEnumerable<T> enumerable) 892 internal static IntPtr IListToNativeList<T>(IList<T> list, bool isMoved)
892 { 893 {
893 if (enumerable == null) 894 if (list == null)
894 throw new ArgumentException("enumerable is null", nameof(enumerable)); 895 throw new ArgumentException("list is null", nameof(list));
895 896
896 IntPtr list = IntPtr.Zero; 897 // If we are a wrapper around an existing Eina.List, we can just forward
897 foreach (T data in enumerable) 898 // it and avoid unnecessary copying in non-owning transfers.
899 var wrappedList = list as Eina.List<T>;
900
901 if (wrappedList != null && !isMoved)
902 {
903 return wrappedList.Handle;
904 }
905
906 IntPtr nativeList = IntPtr.Zero;
907 foreach (T data in list)
898 { 908 {
899 list = Eina.ListNativeFunctions.eina_list_append(list, Eina.TraitFunctions.ManagedToNativeAlloc(data)); 909 nativeList = Eina.ListNativeFunctions.eina_list_append(nativeList, Eina.TraitFunctions.ManagedToNativeAlloc(data)); //FIXME: need to free
900 } 910 }
911
912 if (!isMoved)
913 {
914 // FIXME Need to free ret and unpin pinnedArray in the future.
915 }
916
917 return nativeList;
918 }
919
920 internal static IList<T> NativeArrayToIList<T>(IntPtr nativeArray)
921 {
922 if (nativeArray == IntPtr.Zero)
923 throw new ArgumentException("nativeArray is null", nameof(nativeArray));
924
925 List<T> list = new List<T>();
926 UpdateListFromNativeArray(list, nativeArray);
927
901 // FIXME need to free `list` if the returned list is not @moved 928 // FIXME need to free `list` if the returned list is not @moved
902 return list; 929 return list;
903 } 930 }
904 931
932 internal static IntPtr IListToNativeArray<T>(IList<T> list, bool isMoved)
933 {
934 if (list == null)
935 throw new ArgumentException("list is null", nameof(list));
936
937 // If we are a wrapper around an existing Eina.Array, we can just forward
938 // it and avoid unnecessary copying in non-owning transfers.
939 var wrappedArray = list as Eina.Array<T>;
940
941 if (wrappedArray != null && !isMoved)
942 {
943 return wrappedArray.Handle;
944 }
945
946 IntPtr nativeArray = Eina.ArrayNativeFunctions.eina_array_new(4);
947 foreach (T data in list)
948 {
949 Eina.ArrayNativeFunctions.eina_array_push_custom_export_mono(nativeArray, Eina.TraitFunctions.ManagedToNativeAlloc(data)); //FIXME: need to free
950 }
951
952 if (!isMoved)
953 {
954 // FIXME Need to free ret and unpin pinnedArray in the future.
955 }
956
957 return nativeArray;
958 }
959
960 internal static void UpdateListFromNativeArray<T>(IList<T> list, IntPtr nativeArray)
961 {
962 // Do not update if list Handle is same to nativeArray. They already updated in native code.
963 var wrappedArray = list as Eina.Array<T>;
964 if (wrappedArray != null && wrappedArray.Handle == nativeArray)
965 return;
966
967 list.Clear();
968 if (nativeArray == IntPtr.Zero)
969 {
970 return;
971 }
972
973 uint count = Eina.ArrayNativeFunctions.eina_array_count_custom_export_mono(nativeArray);
974 for (uint i = 0; i < count; i++)
975 {
976 list.Add(Eina.TraitFunctions.NativeToManaged<T>(Eina.ArrayNativeFunctions.eina_array_data_get_custom_export_mono(nativeArray, i)));
977 }
978 }
905 979
906} // Globals 980} // Globals
907 981
diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs
index bee62169bb..461dee6759 100644
--- a/src/tests/efl_mono/Eina.cs
+++ b/src/tests/efl_mono/Eina.cs
@@ -937,7 +937,7 @@ class TestEinaArray
937 var arr = new Eina.Array<int>(); 937 var arr = new Eina.Array<int>();
938 arr.Append(base_seq_int); 938 arr.Append(base_seq_int);
939 Test.Assert(t.EinaArrayIntInOwn(arr)); 939 Test.Assert(t.EinaArrayIntInOwn(arr));
940 Test.Assert(!arr.Own); 940 Test.Assert(arr.Own);
941 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int)); 941 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int));
942 arr.Dispose(); 942 arr.Dispose();
943 Test.Assert(arr.Handle == IntPtr.Zero); 943 Test.Assert(arr.Handle == IntPtr.Zero);
@@ -948,13 +948,10 @@ class TestEinaArray
948 public static void test_eina_array_int_out() 948 public static void test_eina_array_int_out()
949 { 949 {
950 var t = new Dummy.TestObject(); 950 var t = new Dummy.TestObject();
951 Eina.Array<int> arr; 951 IList<int> arr;
952 Test.Assert(t.EinaArrayIntOut(out arr)); 952 Test.Assert(t.EinaArrayIntOut(out arr));
953 Test.Assert(!arr.Own);
954 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int)); 953 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
955 Test.AssertRaises<NotSupportedException>(() => arr.Append(append_seq_int)); 954 Test.Assert(arr.Concat(append_seq_int) != null);
956 arr.Dispose();
957 Test.Assert(arr.Handle == IntPtr.Zero);
958 Test.Assert(t.CheckEinaArrayIntOut()); 955 Test.Assert(t.CheckEinaArrayIntOut());
959 t.Dispose(); 956 t.Dispose();
960 } 957 }
@@ -962,13 +959,10 @@ class TestEinaArray
962 public static void test_eina_array_int_out_own() 959 public static void test_eina_array_int_out_own()
963 { 960 {
964 var t = new Dummy.TestObject(); 961 var t = new Dummy.TestObject();
965 Eina.Array<int> arr; 962 IList<int> arr;
966 Test.Assert(t.EinaArrayIntOutOwn(out arr)); 963 Test.Assert(t.EinaArrayIntOutOwn(out arr));
967 Test.Assert(arr.Own);
968 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int)); 964 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
969 Test.Assert(arr.Append(append_seq_int)); 965 Test.Assert(arr.Concat(append_seq_int) != null);
970 arr.Dispose();
971 Test.Assert(arr.Handle == IntPtr.Zero);
972 t.Dispose(); 966 t.Dispose();
973 } 967 }
974 968
@@ -976,12 +970,8 @@ class TestEinaArray
976 { 970 {
977 var t = new Dummy.TestObject(); 971 var t = new Dummy.TestObject();
978 var arr = t.EinaArrayIntReturn(); 972 var arr = t.EinaArrayIntReturn();
979 Test.Assert(!arr.Own);
980 Test.Assert(!arr.OwnContent);
981 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int)); 973 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
982 Test.AssertRaises<NotSupportedException>(() => arr.Append(append_seq_int)); 974 Test.Assert(arr.Concat(append_seq_int) != null);
983 arr.Dispose();
984 Test.Assert(arr.Handle == IntPtr.Zero);
985 Test.Assert(t.CheckEinaArrayIntReturn()); 975 Test.Assert(t.CheckEinaArrayIntReturn());
986 t.Dispose(); 976 t.Dispose();
987 } 977 }
@@ -990,11 +980,8 @@ class TestEinaArray
990 { 980 {
991 var t = new Dummy.TestObject(); 981 var t = new Dummy.TestObject();
992 var arr = t.EinaArrayIntReturnOwn(); 982 var arr = t.EinaArrayIntReturnOwn();
993 Test.Assert(arr.Own);
994 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int)); 983 Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
995 Test.Assert(arr.Append(append_seq_int)); 984 Test.Assert(arr.Concat(append_seq_int) != null);
996 arr.Dispose();
997 Test.Assert(arr.Handle == IntPtr.Zero);
998 t.Dispose(); 985 t.Dispose();
999 } 986 }
1000 987
@@ -1018,7 +1005,7 @@ class TestEinaArray
1018 var arr = new Eina.Array<string>(); 1005 var arr = new Eina.Array<string>();
1019 arr.Append(base_seq_str); 1006 arr.Append(base_seq_str);
1020 Test.Assert(t.EinaArrayStrInOwn(arr)); 1007 Test.Assert(t.EinaArrayStrInOwn(arr));
1021 Test.Assert(!arr.Own); 1008 Test.Assert(arr.Own);
1022 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str)); 1009 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str));
1023 arr.Dispose(); 1010 arr.Dispose();
1024 Test.Assert(arr.Handle == IntPtr.Zero); 1011 Test.Assert(arr.Handle == IntPtr.Zero);
@@ -1029,13 +1016,10 @@ class TestEinaArray
1029 public static void test_eina_array_str_out() 1016 public static void test_eina_array_str_out()
1030 { 1017 {
1031 var t = new Dummy.TestObject(); 1018 var t = new Dummy.TestObject();
1032 Eina.Array<string> arr; 1019 IList<string> arr;
1033 Test.Assert(t.EinaArrayStrOut(out arr)); 1020 Test.Assert(t.EinaArrayStrOut(out arr));
1034 Test.Assert(!arr.Own);
1035 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str)); 1021 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
1036 Test.AssertRaises<NotSupportedException>(() => arr.Append(append_seq_str)); 1022 Test.Assert(arr.Concat(append_seq_str) != null);
1037 arr.Dispose();
1038 Test.Assert(arr.Handle == IntPtr.Zero);
1039 Test.Assert(t.CheckEinaArrayStrOut()); 1023 Test.Assert(t.CheckEinaArrayStrOut());
1040 t.Dispose(); 1024 t.Dispose();
1041 } 1025 }
@@ -1043,13 +1027,10 @@ class TestEinaArray
1043 public static void test_eina_array_str_out_own() 1027 public static void test_eina_array_str_out_own()
1044 { 1028 {
1045 var t = new Dummy.TestObject(); 1029 var t = new Dummy.TestObject();
1046 Eina.Array<string> arr; 1030 IList<string> arr;
1047 Test.Assert(t.EinaArrayStrOutOwn(out arr)); 1031 Test.Assert(t.EinaArrayStrOutOwn(out arr));
1048 Test.Assert(arr.Own);
1049 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str)); 1032 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
1050 Test.Assert(arr.Append(append_seq_str)); 1033 Test.Assert(arr.Concat(append_seq_str) != null);
1051 arr.Dispose();
1052 Test.Assert(arr.Handle == IntPtr.Zero);
1053 t.Dispose(); 1034 t.Dispose();
1054 } 1035 }
1055 1036
@@ -1057,11 +1038,8 @@ class TestEinaArray
1057 { 1038 {
1058 var t = new Dummy.TestObject(); 1039 var t = new Dummy.TestObject();
1059 var arr = t.EinaArrayStrReturn(); 1040 var arr = t.EinaArrayStrReturn();
1060 Test.Assert(!arr.Own);
1061 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str)); 1041 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
1062 Test.AssertRaises<NotSupportedException>(() => arr.Append(append_seq_str)); 1042 Test.Assert(arr.Concat(append_seq_str) != null);
1063 arr.Dispose();
1064 Test.Assert(arr.Handle == IntPtr.Zero);
1065 Test.Assert(t.CheckEinaArrayStrReturn()); 1043 Test.Assert(t.CheckEinaArrayStrReturn());
1066 t.Dispose(); 1044 t.Dispose();
1067 } 1045 }
@@ -1070,11 +1048,8 @@ class TestEinaArray
1070 { 1048 {
1071 var t = new Dummy.TestObject(); 1049 var t = new Dummy.TestObject();
1072 var arr = t.EinaArrayStrReturnOwn(); 1050 var arr = t.EinaArrayStrReturnOwn();
1073 Test.Assert(arr.Own);
1074 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str)); 1051 Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
1075 Test.Assert(arr.Append(append_seq_str)); 1052 Test.Assert(arr.Concat(append_seq_str) != null);
1076 arr.Dispose();
1077 Test.Assert(arr.Handle == IntPtr.Zero);
1078 t.Dispose(); 1053 t.Dispose();
1079 } 1054 }
1080 1055
@@ -1098,7 +1073,7 @@ class TestEinaArray
1098 var arr = new Eina.Array<Eina.Stringshare>(); 1073 var arr = new Eina.Array<Eina.Stringshare>();
1099 arr.Append(base_seq_strshare); 1074 arr.Append(base_seq_strshare);
1100 Test.Assert(t.EinaArrayStrshareInOwn(arr)); 1075 Test.Assert(t.EinaArrayStrshareInOwn(arr));
1101 Test.Assert(!arr.Own); 1076 Test.Assert(arr.Own);
1102 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_strshare)); 1077 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_strshare));
1103 arr.Dispose(); 1078 arr.Dispose();
1104 Test.Assert(arr.Handle == IntPtr.Zero); 1079 Test.Assert(arr.Handle == IntPtr.Zero);
@@ -1109,13 +1084,10 @@ class TestEinaArray
1109 public static void test_eina_array_strshare_out() 1084 public static void test_eina_array_strshare_out()
1110 { 1085 {
1111 var t = new Dummy.TestObject(); 1086 var t = new Dummy.TestObject();
1112 Eina.Array<Eina.Stringshare> arr; 1087 IList<Eina.Stringshare> arr;
1113 Test.Assert(t.EinaArrayStrshareOut(out arr)); 1088 Test.Assert(t.EinaArrayStrshareOut(out arr));
1114 Test.Assert(!arr.Own);
1115 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare)); 1089 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare));
1116 Test.AssertRaises<NotSupportedException>(() => arr.Append(append_seq_strshare)); 1090 Test.Assert(arr.Concat(append_seq_strshare) != null);
1117 arr.Dispose();
1118 Test.Assert(arr.Handle == IntPtr.Zero);
1119 Test.Assert(t.CheckEinaArrayStrshareOut()); 1091 Test.Assert(t.CheckEinaArrayStrshareOut());
1120 t.Dispose(); 1092 t.Dispose();
1121 } 1093 }
@@ -1123,13 +1095,10 @@ class TestEinaArray
1123 public static void test_eina_array_strshare_out_own() 1095 public static void test_eina_array_strshare_out_own()
1124 { 1096 {
1125 var t = new Dummy.TestObject(); 1097 var t = new Dummy.TestObject();
1126 Eina.Array<Eina.Stringshare> arr; 1098 IList<Eina.Stringshare> arr;
1127 Test.Assert(t.EinaArrayStrshareOutOwn(out arr)); 1099 Test.Assert(t.EinaArrayStrshareOutOwn(out arr));
1128 Test.Assert(arr.Own);
1129 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare)); 1100 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare));
1130 Test.Assert(arr.Append(append_seq_strshare)); 1101 Test.Assert(arr.Concat(append_seq_strshare) != null);
1131 arr.Dispose();
1132 Test.Assert(arr.Handle == IntPtr.Zero);
1133 t.Dispose(); 1102 t.Dispose();
1134 } 1103 }
1135 1104
@@ -1137,11 +1106,8 @@ class TestEinaArray
1137 { 1106 {
1138 var t = new Dummy.TestObject(); 1107 var t = new Dummy.TestObject();
1139 var arr = t.EinaArrayStrshareReturn(); 1108 var arr = t.EinaArrayStrshareReturn();
1140 Test.Assert(!arr.Own);
1141 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare)); 1109 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare));
1142 Test.AssertRaises<NotSupportedException>(() => arr.Append(append_seq_strshare)); 1110 Test.Assert(arr.Concat(append_seq_strshare) != null);
1143 arr.Dispose();
1144 Test.Assert(arr.Handle == IntPtr.Zero);
1145 Test.Assert(t.CheckEinaArrayStrshareReturn()); 1111 Test.Assert(t.CheckEinaArrayStrshareReturn());
1146 t.Dispose(); 1112 t.Dispose();
1147 } 1113 }
@@ -1150,11 +1116,8 @@ class TestEinaArray
1150 { 1116 {
1151 var t = new Dummy.TestObject(); 1117 var t = new Dummy.TestObject();
1152 var arr = t.EinaArrayStrshareReturnOwn(); 1118 var arr = t.EinaArrayStrshareReturnOwn();
1153 Test.Assert(arr.Own);
1154 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare)); 1119 Test.Assert(arr.ToArray().SequenceEqual(base_seq_strshare));
1155 Test.Assert(arr.Append(append_seq_strshare)); 1120 Test.Assert(arr.Concat(append_seq_strshare) != null);
1156 arr.Dispose();
1157 Test.Assert(arr.Handle == IntPtr.Zero);
1158 t.Dispose(); 1121 t.Dispose();
1159 } 1122 }
1160 1123
@@ -1179,7 +1142,7 @@ class TestEinaArray
1179 var arr = new Eina.Array<Dummy.Numberwrapper>(); 1142 var arr = new Eina.Array<Dummy.Numberwrapper>();
1180 arr.Append(BaseSeqObj()); 1143 arr.Append(BaseSeqObj());
1181 Test.Assert(t.EinaArrayObjInOwn(arr)); 1144 Test.Assert(t.EinaArrayObjInOwn(arr));
1182 Test.Assert(!arr.Own); 1145 Test.Assert(arr.Own);
1183 NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj()); 1146 NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj());
1184 arr.Dispose(); 1147 arr.Dispose();
1185 Test.Assert(arr.Handle == IntPtr.Zero); 1148 Test.Assert(arr.Handle == IntPtr.Zero);
@@ -1190,13 +1153,10 @@ class TestEinaArray
1190 public static void test_eina_array_obj_out() 1153 public static void test_eina_array_obj_out()
1191 { 1154 {
1192 var t = new Dummy.TestObject(); 1155 var t = new Dummy.TestObject();
1193 Eina.Array<Dummy.Numberwrapper> arr; 1156 IList<Dummy.Numberwrapper> arr;
1194 Test.Assert(t.EinaArrayObjOut(out arr)); 1157 Test.Assert(t.EinaArrayObjOut(out arr));
1195 Test.Assert(!arr.Own);
1196 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj()); 1158 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
1197 Test.AssertRaises<NotSupportedException>(() => arr.Append(AppendSeqObj())); 1159 Test.Assert(arr.Concat(AppendSeqObj()) != null);
1198 arr.Dispose();
1199 Test.Assert(arr.Handle == IntPtr.Zero);
1200 Test.Assert(t.CheckEinaArrayObjOut()); 1160 Test.Assert(t.CheckEinaArrayObjOut());
1201 t.Dispose(); 1161 t.Dispose();
1202 } 1162 }
@@ -1204,13 +1164,10 @@ class TestEinaArray
1204 public static void test_eina_array_obj_out_own() 1164 public static void test_eina_array_obj_out_own()
1205 { 1165 {
1206 var t = new Dummy.TestObject(); 1166 var t = new Dummy.TestObject();
1207 Eina.Array<Dummy.Numberwrapper> arr; 1167 IList<Dummy.Numberwrapper> arr;
1208 Test.Assert(t.EinaArrayObjOutOwn(out arr)); 1168 Test.Assert(t.EinaArrayObjOutOwn(out arr));
1209 Test.Assert(arr.Own);
1210 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj()); 1169 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
1211 Test.Assert(arr.Append(AppendSeqObj())); 1170 Test.Assert(arr.Concat(AppendSeqObj()) != null);
1212 arr.Dispose();
1213 Test.Assert(arr.Handle == IntPtr.Zero);
1214 t.Dispose(); 1171 t.Dispose();
1215 } 1172 }
1216 1173
@@ -1218,11 +1175,8 @@ class TestEinaArray
1218 { 1175 {
1219 var t = new Dummy.TestObject(); 1176 var t = new Dummy.TestObject();
1220 var arr = t.EinaArrayObjReturn(); 1177 var arr = t.EinaArrayObjReturn();
1221 Test.Assert(!arr.Own);
1222 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj()); 1178 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
1223 Test.AssertRaises<NotSupportedException>(() => arr.Append(AppendSeqObj())); 1179 Test.Assert(arr.Concat(AppendSeqObj()) != null);
1224 arr.Dispose();
1225 Test.Assert(arr.Handle == IntPtr.Zero);
1226 Test.Assert(t.CheckEinaArrayObjReturn()); 1180 Test.Assert(t.CheckEinaArrayObjReturn());
1227 t.Dispose(); 1181 t.Dispose();
1228 } 1182 }
@@ -1231,11 +1185,8 @@ class TestEinaArray
1231 { 1185 {
1232 var t = new Dummy.TestObject(); 1186 var t = new Dummy.TestObject();
1233 var arr = t.EinaArrayObjReturnOwn(); 1187 var arr = t.EinaArrayObjReturnOwn();
1234 Test.Assert(arr.Own);
1235 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj()); 1188 NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
1236 Test.Assert(arr.Append(AppendSeqObj())); 1189 Test.Assert(arr.Concat(AppendSeqObj()) != null);
1237 arr.Dispose();
1238 Test.Assert(arr.Handle == IntPtr.Zero);
1239 t.Dispose(); 1190 t.Dispose();
1240 } 1191 }
1241 1192
@@ -2119,8 +2070,8 @@ class TestEinaList
2119 var lst = new Eina.List<int>(); 2070 var lst = new Eina.List<int>();
2120 lst.Append(base_seq_int); 2071 lst.Append(base_seq_int);
2121 Test.Assert(t.EinaListIntInOwn(lst)); 2072 Test.Assert(t.EinaListIntInOwn(lst));
2122 Test.Assert(!lst.Own); 2073 Test.Assert(lst.Own);
2123 Test.Assert(!lst.OwnContent); 2074 Test.Assert(lst.OwnContent);
2124 lst.Dispose(); 2075 lst.Dispose();
2125 Test.Assert(lst.Handle == IntPtr.Zero); 2076 Test.Assert(lst.Handle == IntPtr.Zero);
2126 Test.Assert(t.CheckEinaListIntInOwn()); 2077 Test.Assert(t.CheckEinaListIntInOwn());
@@ -2130,13 +2081,9 @@ class TestEinaList
2130 public static void test_eina_list_int_out() 2081 public static void test_eina_list_int_out()
2131 { 2082 {
2132 var t = new Dummy.TestObject(); 2083 var t = new Dummy.TestObject();
2133 Eina.List<int> lst; 2084 IList<int> lst;
2134 Test.Assert(t.EinaListIntOut(out lst)); 2085 Test.Assert(t.EinaListIntOut(out lst));
2135 Test.Assert(!lst.Own);
2136 Test.Assert(!lst.OwnContent);
2137 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int)); 2086 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
2138 lst.Dispose();
2139 Test.Assert(lst.Handle == IntPtr.Zero);
2140 Test.Assert(t.CheckEinaListIntOut()); 2087 Test.Assert(t.CheckEinaListIntOut());
2141 t.Dispose(); 2088 t.Dispose();
2142 } 2089 }
@@ -2144,13 +2091,10 @@ class TestEinaList
2144 public static void test_eina_list_int_out_own() 2091 public static void test_eina_list_int_out_own()
2145 { 2092 {
2146 var t = new Dummy.TestObject(); 2093 var t = new Dummy.TestObject();
2147 Eina.List<int> lst; 2094 IList<int> lst;
2148 Test.Assert(t.EinaListIntOutOwn(out lst)); 2095 Test.Assert(t.EinaListIntOutOwn(out lst));
2149 Test.Assert(lst.Own);
2150 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int)); 2096 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
2151 lst.Append(append_seq_int); 2097 lst.Concat(append_seq_int);
2152 lst.Dispose();
2153 Test.Assert(lst.Handle == IntPtr.Zero);
2154 t.Dispose(); 2098 t.Dispose();
2155 } 2099 }
2156 2100
@@ -2158,11 +2102,7 @@ class TestEinaList
2158 { 2102 {
2159 var t = new Dummy.TestObject(); 2103 var t = new Dummy.TestObject();
2160 var lst = t.EinaListIntReturn(); 2104 var lst = t.EinaListIntReturn();
2161 Test.Assert(!lst.Own);
2162 Test.Assert(!lst.OwnContent);
2163 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int)); 2105 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
2164 lst.Dispose();
2165 Test.Assert(lst.Handle == IntPtr.Zero);
2166 Test.Assert(t.CheckEinaListIntReturn()); 2106 Test.Assert(t.CheckEinaListIntReturn());
2167 t.Dispose(); 2107 t.Dispose();
2168 } 2108 }
@@ -2171,11 +2111,8 @@ class TestEinaList
2171 { 2111 {
2172 var t = new Dummy.TestObject(); 2112 var t = new Dummy.TestObject();
2173 var lst = t.EinaListIntReturnOwn(); 2113 var lst = t.EinaListIntReturnOwn();
2174 Test.Assert(lst.Own);
2175 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int)); 2114 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
2176 lst.Append(append_seq_int); 2115 lst.Concat(append_seq_int);
2177 lst.Dispose();
2178 Test.Assert(lst.Handle == IntPtr.Zero);
2179 t.Dispose(); 2116 t.Dispose();
2180 } 2117 }
2181 2118
@@ -2199,7 +2136,7 @@ class TestEinaList
2199 var lst = new Eina.List<string>(); 2136 var lst = new Eina.List<string>();
2200 lst.Append(base_seq_str); 2137 lst.Append(base_seq_str);
2201 Test.Assert(t.EinaListStrInOwn(lst)); 2138 Test.Assert(t.EinaListStrInOwn(lst));
2202 Test.Assert(!lst.Own); 2139 Test.Assert(lst.Own);
2203 lst.Dispose(); 2140 lst.Dispose();
2204 Test.Assert(lst.Handle == IntPtr.Zero); 2141 Test.Assert(lst.Handle == IntPtr.Zero);
2205 Test.Assert(t.CheckEinaListStrInOwn()); 2142 Test.Assert(t.CheckEinaListStrInOwn());
@@ -2209,12 +2146,9 @@ class TestEinaList
2209 public static void test_eina_list_str_out() 2146 public static void test_eina_list_str_out()
2210 { 2147 {
2211 var t = new Dummy.TestObject(); 2148 var t = new Dummy.TestObject();
2212 Eina.List<string> lst; 2149 IList<string> lst;
2213 Test.Assert(t.EinaListStrOut(out lst)); 2150 Test.Assert(t.EinaListStrOut(out lst));
2214 Test.Assert(!lst.Own);
2215 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str)); 2151 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
2216 lst.Dispose();
2217 Test.Assert(lst.Handle == IntPtr.Zero);
2218 Test.Assert(t.CheckEinaListStrOut()); 2152 Test.Assert(t.CheckEinaListStrOut());
2219 t.Dispose(); 2153 t.Dispose();
2220 } 2154 }
@@ -2222,13 +2156,10 @@ class TestEinaList
2222 public static void test_eina_list_str_out_own() 2156 public static void test_eina_list_str_out_own()
2223 { 2157 {
2224 var t = new Dummy.TestObject(); 2158 var t = new Dummy.TestObject();
2225 Eina.List<string> lst; 2159 IList<string> lst;
2226 Test.Assert(t.EinaListStrOutOwn(out lst)); 2160 Test.Assert(t.EinaListStrOutOwn(out lst));
2227 Test.Assert(lst.Own);
2228 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str)); 2161 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
2229 lst.Append(append_seq_str); 2162 lst.Concat(append_seq_str);
2230 lst.Dispose();
2231 Test.Assert(lst.Handle == IntPtr.Zero);
2232 t.Dispose(); 2163 t.Dispose();
2233 } 2164 }
2234 2165
@@ -2236,10 +2167,7 @@ class TestEinaList
2236 { 2167 {
2237 var t = new Dummy.TestObject(); 2168 var t = new Dummy.TestObject();
2238 var lst = t.EinaListStrReturn(); 2169 var lst = t.EinaListStrReturn();
2239 Test.Assert(!lst.Own);
2240 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str)); 2170 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
2241 lst.Dispose();
2242 Test.Assert(lst.Handle == IntPtr.Zero);
2243 Test.Assert(t.CheckEinaListStrReturn()); 2171 Test.Assert(t.CheckEinaListStrReturn());
2244 t.Dispose(); 2172 t.Dispose();
2245 } 2173 }
@@ -2248,11 +2176,8 @@ class TestEinaList
2248 { 2176 {
2249 var t = new Dummy.TestObject(); 2177 var t = new Dummy.TestObject();
2250 var lst = t.EinaListStrReturnOwn(); 2178 var lst = t.EinaListStrReturnOwn();
2251 Test.Assert(lst.Own);
2252 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str)); 2179 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
2253 lst.Append(append_seq_str); 2180 lst.Concat(append_seq_str);
2254 lst.Dispose();
2255 Test.Assert(lst.Handle == IntPtr.Zero);
2256 t.Dispose(); 2181 t.Dispose();
2257 } 2182 }
2258 2183
@@ -2276,7 +2201,7 @@ class TestEinaList
2276 var lst = new Eina.List<Eina.Stringshare>(); 2201 var lst = new Eina.List<Eina.Stringshare>();
2277 lst.Append(base_seq_strshare); 2202 lst.Append(base_seq_strshare);
2278 Test.Assert(t.EinaListStrshareInOwn(lst)); 2203 Test.Assert(t.EinaListStrshareInOwn(lst));
2279 Test.Assert(!lst.Own); 2204 Test.Assert(lst.Own);
2280 lst.Dispose(); 2205 lst.Dispose();
2281 Test.Assert(lst.Handle == IntPtr.Zero); 2206 Test.Assert(lst.Handle == IntPtr.Zero);
2282 Test.Assert(t.CheckEinaListStrshareInOwn()); 2207 Test.Assert(t.CheckEinaListStrshareInOwn());
@@ -2286,12 +2211,9 @@ class TestEinaList
2286 public static void test_eina_list_strshare_out() 2211 public static void test_eina_list_strshare_out()
2287 { 2212 {
2288 var t = new Dummy.TestObject(); 2213 var t = new Dummy.TestObject();
2289 Eina.List<Eina.Stringshare> lst; 2214 IList<Eina.Stringshare> lst;
2290 Test.Assert(t.EinaListStrshareOut(out lst)); 2215 Test.Assert(t.EinaListStrshareOut(out lst));
2291 Test.Assert(!lst.Own);
2292 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare)); 2216 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare));
2293 lst.Dispose();
2294 Test.Assert(lst.Handle == IntPtr.Zero);
2295 Test.Assert(t.CheckEinaListStrshareOut()); 2217 Test.Assert(t.CheckEinaListStrshareOut());
2296 t.Dispose(); 2218 t.Dispose();
2297 } 2219 }
@@ -2299,13 +2221,10 @@ class TestEinaList
2299 public static void test_eina_list_strshare_out_own() 2221 public static void test_eina_list_strshare_out_own()
2300 { 2222 {
2301 var t = new Dummy.TestObject(); 2223 var t = new Dummy.TestObject();
2302 Eina.List<Eina.Stringshare> lst; 2224 IList<Eina.Stringshare> lst;
2303 Test.Assert(t.EinaListStrshareOutOwn(out lst)); 2225 Test.Assert(t.EinaListStrshareOutOwn(out lst));
2304 Test.Assert(lst.Own);
2305 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare)); 2226 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare));
2306 lst.Append(append_seq_strshare); 2227 lst.Concat(append_seq_strshare);
2307 lst.Dispose();
2308 Test.Assert(lst.Handle == IntPtr.Zero);
2309 t.Dispose(); 2228 t.Dispose();
2310 } 2229 }
2311 2230
@@ -2313,10 +2232,7 @@ class TestEinaList
2313 { 2232 {
2314 var t = new Dummy.TestObject(); 2233 var t = new Dummy.TestObject();
2315 var lst = t.EinaListStrshareReturn(); 2234 var lst = t.EinaListStrshareReturn();
2316 Test.Assert(!lst.Own);
2317 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare)); 2235 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare));
2318 lst.Dispose();
2319 Test.Assert(lst.Handle == IntPtr.Zero);
2320 Test.Assert(t.CheckEinaListStrshareReturn()); 2236 Test.Assert(t.CheckEinaListStrshareReturn());
2321 t.Dispose(); 2237 t.Dispose();
2322 } 2238 }
@@ -2325,11 +2241,8 @@ class TestEinaList
2325 { 2241 {
2326 var t = new Dummy.TestObject(); 2242 var t = new Dummy.TestObject();
2327 var lst = t.EinaListStrshareReturnOwn(); 2243 var lst = t.EinaListStrshareReturnOwn();
2328 Test.Assert(lst.Own);
2329 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare)); 2244 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare));
2330 lst.Append(append_seq_strshare); 2245 lst.Concat(append_seq_strshare);
2331 lst.Dispose();
2332 Test.Assert(lst.Handle == IntPtr.Zero);
2333 t.Dispose(); 2246 t.Dispose();
2334 } 2247 }
2335 2248
@@ -2354,7 +2267,7 @@ class TestEinaList
2354 var lst = new Eina.List<Dummy.Numberwrapper>(); 2267 var lst = new Eina.List<Dummy.Numberwrapper>();
2355 lst.Append(BaseSeqObj()); 2268 lst.Append(BaseSeqObj());
2356 Test.Assert(t.EinaListObjInOwn(lst)); 2269 Test.Assert(t.EinaListObjInOwn(lst));
2357 Test.Assert(!lst.Own); 2270 Test.Assert(lst.Own);
2358 lst.Dispose(); 2271 lst.Dispose();
2359 Test.Assert(lst.Handle == IntPtr.Zero); 2272 Test.Assert(lst.Handle == IntPtr.Zero);
2360 Test.Assert(t.CheckEinaListObjInOwn()); 2273 Test.Assert(t.CheckEinaListObjInOwn());
@@ -2364,12 +2277,9 @@ class TestEinaList
2364 public static void test_eina_list_obj_out() 2277 public static void test_eina_list_obj_out()
2365 { 2278 {
2366 var t = new Dummy.TestObject(); 2279 var t = new Dummy.TestObject();
2367 Eina.List<Dummy.Numberwrapper> lst; 2280 IList<Dummy.Numberwrapper> lst;
2368 Test.Assert(t.EinaListObjOut(out lst)); 2281 Test.Assert(t.EinaListObjOut(out lst));
2369 Test.Assert(!lst.Own);
2370 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj()); 2282 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
2371 lst.Dispose();
2372 Test.Assert(lst.Handle == IntPtr.Zero);
2373 Test.Assert(t.CheckEinaListObjOut()); 2283 Test.Assert(t.CheckEinaListObjOut());
2374 t.Dispose(); 2284 t.Dispose();
2375 } 2285 }
@@ -2377,13 +2287,10 @@ class TestEinaList
2377 public static void test_eina_list_obj_out_own() 2287 public static void test_eina_list_obj_out_own()
2378 { 2288 {
2379 var t = new Dummy.TestObject(); 2289 var t = new Dummy.TestObject();
2380 Eina.List<Dummy.Numberwrapper> lst; 2290 IList<Dummy.Numberwrapper> lst;
2381 Test.Assert(t.EinaListObjOutOwn(out lst)); 2291 Test.Assert(t.EinaListObjOutOwn(out lst));
2382 Test.Assert(lst.Own);
2383 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj()); 2292 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
2384 lst.Append(AppendSeqObj()); 2293 lst.Concat(AppendSeqObj());
2385 lst.Dispose();
2386 Test.Assert(lst.Handle == IntPtr.Zero);
2387 t.Dispose(); 2294 t.Dispose();
2388 } 2295 }
2389 2296
@@ -2391,10 +2298,7 @@ class TestEinaList
2391 { 2298 {
2392 var t = new Dummy.TestObject(); 2299 var t = new Dummy.TestObject();
2393 var lst = t.EinaListObjReturn(); 2300 var lst = t.EinaListObjReturn();
2394 Test.Assert(!lst.Own);
2395 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj()); 2301 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
2396 lst.Dispose();
2397 Test.Assert(lst.Handle == IntPtr.Zero);
2398 Test.Assert(t.CheckEinaListObjReturn()); 2302 Test.Assert(t.CheckEinaListObjReturn());
2399 t.Dispose(); 2303 t.Dispose();
2400 } 2304 }
@@ -2403,11 +2307,8 @@ class TestEinaList
2403 { 2307 {
2404 var t = new Dummy.TestObject(); 2308 var t = new Dummy.TestObject();
2405 var lst = t.EinaListObjReturnOwn(); 2309 var lst = t.EinaListObjReturnOwn();
2406 Test.Assert(lst.Own);
2407 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj()); 2310 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
2408 lst.Append(AppendSeqObj()); 2311 lst.Concat(AppendSeqObj());
2409 lst.Dispose();
2410 Test.Assert(lst.Handle == IntPtr.Zero);
2411 t.Dispose(); 2312 t.Dispose();
2412 } 2313 }
2413 2314
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index 824d9a132c..5f8cc0fa52 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -15,6 +15,7 @@
15 */ 15 */
16using System; 16using System;
17using System.Linq; 17using System.Linq;
18using System.Collections.Generic;
18 19
19namespace TestSuite 20namespace TestSuite
20{ 21{
@@ -226,7 +227,7 @@ class TestEoEvents
226 public static void event_with_array_payload() 227 public static void event_with_array_payload()
227 { 228 {
228 var obj = new Dummy.TestObject(); 229 var obj = new Dummy.TestObject();
229 Eina.Array<string> received = null; 230 List<string> received = null;
230 Eina.Array<string> sent = new Eina.Array<string>(); 231 Eina.Array<string> sent = new Eina.Array<string>();
231 232
232 sent.Append("Abc"); 233 sent.Append("Abc");
@@ -234,7 +235,7 @@ class TestEoEvents
234 sent.Append("Ghi"); 235 sent.Append("Ghi");
235 236
236 obj.EvtWithArrayEvent += (object sender, Dummy.TestObjectEvtWithArrayEventArgs e) => { 237 obj.EvtWithArrayEvent += (object sender, Dummy.TestObjectEvtWithArrayEventArgs e) => {
237 received = e.arg; 238 received = e.arg as List<string>;
238 }; 239 };
239 240
240 obj.EmitEventWithArray(sent); 241 obj.EmitEventWithArray(sent);
@@ -246,7 +247,6 @@ class TestEoEvents
246 Test.AssertEquals(pair.Sent, pair.Received); 247 Test.AssertEquals(pair.Sent, pair.Received);
247 } 248 }
248 sent.Dispose(); 249 sent.Dispose();
249 received.Dispose();
250 obj.Dispose(); 250 obj.Dispose();
251 } 251 }
252} 252}
diff --git a/src/tests/efl_mono/StructHelpers.cs b/src/tests/efl_mono/StructHelpers.cs
index 9c9f75076e..5e6dc506a7 100644
--- a/src/tests/efl_mono/StructHelpers.cs
+++ b/src/tests/efl_mono/StructHelpers.cs
@@ -16,6 +16,7 @@
16using System; 16using System;
17using System.Linq; 17using System.Linq;
18using System.Runtime.InteropServices; 18using System.Runtime.InteropServices;
19using System.Collections.Generic;
19 20
20using Eina; 21using Eina;
21using static EinaTestData.BaseData; 22using static EinaTestData.BaseData;
@@ -139,21 +140,21 @@ internal class StructHelpers
139 var complex = new Dummy.StructComplex(); 140 var complex = new Dummy.StructComplex();
140 141
141 complex.Farray = new Eina.Array<string>(); 142 complex.Farray = new Eina.Array<string>();
142 complex.Farray.Push("0x0"); 143 complex.Farray.Add("0x0");
143 complex.Farray.Push("0x2A"); 144 complex.Farray.Add("0x2A");
144 complex.Farray.Push("0x42"); 145 complex.Farray.Add("0x42");
145 146
146 complex.Flist = new Eina.List<string>(); 147 complex.Flist = new Eina.List<string>();
147 complex.Flist.Append("0x0"); 148 complex.Flist.Add("0x0");
148 complex.Flist.Append("0x2A"); 149 complex.Flist.Add("0x2A");
149 complex.Flist.Append("0x42"); 150 complex.Flist.Add("0x42");
150 151
151 complex.Fhash = new Eina.Hash<string, string>(); 152 complex.Fhash = new Eina.Hash<string, string>();
152 complex.Fhash["aa"] = "aaa"; 153 complex.Fhash["aa"] = "aaa";
153 complex.Fhash["bb"] = "bbb"; 154 complex.Fhash["bb"] = "bbb";
154 complex.Fhash["cc"] = "ccc"; 155 complex.Fhash["cc"] = "ccc";
155 156
156 complex.Fiterator = complex.Farray.GetIterator(); 157 complex.Fiterator = ((Eina.Array<string>)complex.Farray).GetIterator();
157 158
158 complex.Fany_value = new Eina.Value(Eina.ValueType.Double); 159 complex.Fany_value = new Eina.Value(Eina.ValueType.Double);
159 complex.Fany_value.Set(-9007199254740992.0); 160 complex.Fany_value.Set(-9007199254740992.0);