summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-12-16 11:23:28 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-12-16 16:48:48 -0300
commitfd40e5daa940c6952bb3eaaec2e279b078499375 (patch)
treeee36f8861d438d6baea42675195a3b9ddbd0b642
parent16efc25ceb3a7fbf4605fb808748dcdbc004e6fb (diff)
eina_mono: replace EinaAccessor and EinaIerator with IEnumerable
Summary: Eina.Accessor<T> => System.Collections.IEnumerable<T> Eina.Iterator<T> => System.Collections.IEnumerable<T> Unit test will work with D10879. ref T8486 Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8486 Differential Revision: https://phab.enlightenment.org/D10878
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh14
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh141
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh10
-rw-r--r--src/bin/eolian_mono/eolian/mono/type_impl.hh4
-rw-r--r--src/bindings/mono/efl_mono/GenericModel.cs4
-rw-r--r--src/bindings/mono/efl_mono/efl_csharp_application.cs3
-rw-r--r--src/bindings/mono/eina_mono/eina_accessor.cs8
-rw-r--r--src/bindings/mono/eina_mono/eina_iterator.cs2
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs86
-rw-r--r--src/tests/efl_mono/Eina.cs72
-rw-r--r--src/tests/efl_mono/Eo.cs2
11 files changed, 235 insertions, 111 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index f0367c31dc..a77f6d7d9c 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -133,9 +133,14 @@ struct unpack_event_args_visitor
133 { 133 {
134 return as_generator("(Efl.Eo.Globals.CreateWrapperFor(info) as " + name_helpers::klass_full_concrete_name(cls) + ")").generate(sink, attributes::unused, *context); 134 return as_generator("(Efl.Eo.Globals.CreateWrapperFor(info) as " + name_helpers::klass_full_concrete_name(cls) + ")").generate(sink, attributes::unused, *context);
135 } 135 }
136 bool operator()(attributes::complex_type_def const&) const 136 bool operator()(attributes::complex_type_def const& types) const
137 { 137 {
138 return as_generator("new " << eolian_mono::type << "(info, false, false)").generate(sink, type, *context); 138 if (types.outer.base_type == "iterator")
139 return as_generator("Efl.Eo.Globals.IteratorTo" << eolian_mono::type << "(info)").generate(sink, type, *context);
140 else if (types.outer.base_type == "accessor")
141 return as_generator("Efl.Eo.Globals.AccessorTo" << eolian_mono::type << "(info)").generate(sink, type, *context);
142 else
143 return as_generator("new " << eolian_mono::type << "(info, false, false)").generate(sink, type, *context);
139 } 144 }
140}; 145};
141 146
@@ -222,9 +227,12 @@ struct pack_event_info_and_call_visitor
222 << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" 227 << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
223 ).generate(sink, attributes::unused, *context); 228 ).generate(sink, attributes::unused, *context);
224 } 229 }
225 bool operator()(attributes::complex_type_def const&) const 230 bool operator()(attributes::complex_type_def const& type) const
226 { 231 {
227 auto const& indent = current_indentation(*context); 232 auto const& indent = current_indentation(*context);
233 if ((type.outer.base_type == "iterator") || (type.outer.base_type == "accessor"))
234 return true;
235
228 return as_generator(indent << "IntPtr info = e.arg.Handle;\n" 236 return as_generator(indent << "IntPtr info = e.arg.Handle;\n"
229 << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n" 237 << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
230 ).generate(sink, attributes::unused, *context); 238 ).generate(sink, attributes::unused, *context);
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index d27889fcb4..a5a70f2bb0 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -639,16 +639,23 @@ struct native_convert_in_variable_generator
639 << ");\n" 639 << ");\n"
640 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context); 640 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
641 } 641 }
642 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *" 642 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *")
643 || param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *"
644 )
645 { 643 {
646 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 644 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
647 if (!complex) 645 if (!complex)
648 return false; 646 return false;
649 return as_generator( 647 return as_generator(
650 "var " << string << " = new " << type << "(" << escape_keyword(param.param_name) 648 "var " << string << " = Efl.Eo.Globals.IteratorTo" << type << "(" << escape_keyword(param.param_name)
651 << ", " << (param.type.has_own ? "true" : "false") 649 << ");\n"
650 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
651 }
652 else if (param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *")
653 {
654 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
655 if (!complex)
656 return false;
657 return as_generator(
658 "var " << string << " = Efl.Eo.Globals.AccessorTo" << type << "(" << escape_keyword(param.param_name)
652 << ");\n" 659 << ");\n"
653 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context); 660 ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
654 } 661 }
@@ -724,8 +731,6 @@ struct convert_in_variable_generator
724 } 731 }
725 else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *" 732 else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *"
726 || param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *" 733 || param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *"
727 || param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *"
728 || param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *"
729 ) 734 )
730 { 735 {
731 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 736 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
@@ -741,18 +746,34 @@ struct convert_in_variable_generator
741 ).generate(sink, attributes::unused, context)) 746 ).generate(sink, attributes::unused, context))
742 return false; 747 return false;
743 748
744 // Iterators and Accessors can't own their content.
745 if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *"
746 || param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *"
747 )
748 return true;
749
750 if ((param.type.has_own && (complex->subtypes.front().is_value_type || complex->subtypes.front().has_own)) 749 if ((param.type.has_own && (complex->subtypes.front().is_value_type || complex->subtypes.front().has_own))
751 && !as_generator( 750 && !as_generator(
752 escape_keyword(param.param_name) << ".OwnContent = false;\n" 751 escape_keyword(param.param_name) << ".OwnContent = false;\n"
753 ).generate(sink, attributes::unused, context)) 752 ).generate(sink, attributes::unused, context))
754 return false; 753 return false;
755 } 754 }
755 else if (param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *")
756 {
757 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
758 if (!complex)
759 return false;
760 auto var_name = in_variable_name(param.param_name);
761 if (!as_generator(
762 "var " << string << " = " << "Efl.Eo.Globals.IEnumerableToIterator(" << escape_keyword(param.param_name) << ");\n"
763 ).generate(sink, var_name, context))
764 return false;
765 }
766 else if (param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *")
767 {
768 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
769 if (!complex)
770 return false;
771 auto var_name = in_variable_name(param.param_name);
772 if (!as_generator(
773 "var " << string << " = " << "Efl.Eo.Globals.IEnumerableToAccessor(" << escape_keyword(param.param_name) << ");\n"
774 ).generate(sink, var_name, context))
775 return false;
776 }
756 else if (param.type.c_type == "Eina_Value") 777 else if (param.type.c_type == "Eina_Value")
757 { 778 {
758 return as_generator( 779 return as_generator(
@@ -991,22 +1012,31 @@ struct convert_out_assign_generator
991 << ");\n" 1012 << ");\n"
992 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context); 1013 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context);
993 } 1014 }
1015 else if (param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
1016 || param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
1017 || param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
1018 || param_is_acceptable(param, "const Eina_Accessor *", !WANT_OWN, WANT_OUT)
1019 )
1020 {
1021 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1022 if (!complex)
1023 return false;
1024 return as_generator(
1025 string << " = Efl.Eo.Globals.AccessorTo" << type << "(" << string
1026 << ");\n"
1027 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context);
1028 }
994 else if (param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT) 1029 else if (param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT)
995 || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT) 1030 || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT)
996 || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT) 1031 || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT)
997 || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT) 1032 || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT)
998 || param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
999 || param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
1000 || param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
1001 || param_is_acceptable(param, "const Eina_Accessor *", !WANT_OWN, WANT_OUT)
1002 ) 1033 )
1003 { 1034 {
1004 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 1035 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1005 if (!complex) 1036 if (!complex)
1006 return false; 1037 return false;
1007 return as_generator( 1038 return as_generator(
1008 string << " = new " << type << "(" << string 1039 string << " = Efl.Eo.Globals.IteratorTo" << type << "(" << string
1009 << ", " << (param.type.has_own ? "true" : "false")
1010 << ");\n" 1040 << ");\n"
1011 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context); 1041 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context);
1012 } 1042 }
@@ -1121,14 +1151,21 @@ struct convert_return_generator
1121 .generate(sink, ret_type, context)) 1151 .generate(sink, ret_type, context))
1122 return false; 1152 return false;
1123 } 1153 }
1124 else if(ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *" 1154 else if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *")
1125 || ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *" 1155 {
1126 ) 1156 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
1157 if (!complex)
1158 return false;
1159 if (!as_generator("return Efl.Eo.Globals.AccessorTo" << type << "(_ret_var);")
1160 .generate(sink, ret_type, context))
1161 return false;
1162 }
1163 else if (ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *")
1127 { 1164 {
1128 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type); 1165 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
1129 if (!complex) 1166 if (!complex)
1130 return false; 1167 return false;
1131 if (!as_generator("return new " << type << "(_ret_var, " << std::string{ret_type.has_own ? "true" : "false"} << ");\n") 1168 if (!as_generator("return Efl.Eo.Globals.IteratorTo" << type << "(_ret_var);")
1132 .generate(sink, ret_type, context)) 1169 .generate(sink, ret_type, context))
1133 return false; 1170 return false;
1134 } 1171 }
@@ -1239,14 +1276,6 @@ struct native_convert_out_assign_generator
1239 || param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT) 1276 || param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
1240 || param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT) 1277 || param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
1241 || param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT) 1278 || param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
1242 || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT)
1243 || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT)
1244 || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT)
1245 || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT)
1246 || param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
1247 || param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
1248 || param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
1249 || param_is_acceptable(param, "const Eina_Accessor *", !WANT_OWN, WANT_OUT)
1250 ) 1279 )
1251 { 1280 {
1252 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type); 1281 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
@@ -1274,6 +1303,36 @@ struct native_convert_out_assign_generator
1274 ).generate(sink, outvar, context)) 1303 ).generate(sink, outvar, context))
1275 return false; 1304 return false;
1276 } 1305 }
1306 else if (param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
1307 || param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
1308 || param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
1309 || param_is_acceptable(param, "const Eina_Accessor *", !WANT_OWN, WANT_OUT)
1310 )
1311 {
1312 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1313 if (!complex)
1314 return false;
1315 auto outvar = out_variable_name(param.param_name);
1316 if (!as_generator(
1317 string << " = Efl.Eo.Globals.IEnumerableToAccessor(" << string << ");\n"
1318 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), outvar), context))
1319 return false;
1320 }
1321 else if (param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT)
1322 || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT)
1323 || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT)
1324 || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT)
1325 )
1326 {
1327 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&param.type.original_type);
1328 if (!complex)
1329 return false;
1330 auto outvar = out_variable_name(param.param_name);
1331 if (!as_generator(
1332 string << " = Efl.Eo.Globals.IEnumerableToIterator(" << string << ");\n"
1333 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), outvar), context))
1334 return false;
1335 }
1277 return true; 1336 return true;
1278 } 1337 }
1279 1338
@@ -1284,7 +1343,13 @@ struct native_convert_return_variable_generator
1284 template <typename OutputIterator, typename Context> 1343 template <typename OutputIterator, typename Context>
1285 bool generate(OutputIterator sink, attributes::type_def const& ret_type, Context const& context) const 1344 bool generate(OutputIterator sink, attributes::type_def const& ret_type, Context const& context) const
1286 { 1345 {
1287 if (ret_type.c_type != "void") 1346 if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *" ||
1347 ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *")
1348 return as_generator(
1349 type << " _ret_var = null;"
1350 ).generate(sink, ret_type, context);
1351
1352 else if (ret_type.c_type != "void")
1288 return as_generator( 1353 return as_generator(
1289 type << " _ret_var = default(" << type << ");" 1354 type << " _ret_var = default(" << type << ");"
1290 ).generate(sink, std::make_tuple(ret_type, ret_type), context); 1355 ).generate(sink, std::make_tuple(ret_type, ret_type), context);
@@ -1379,8 +1444,6 @@ struct native_convert_return_generator
1379 } 1444 }
1380 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *" 1445 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *"
1381 || ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *" 1446 || ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *"
1382 || ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *"
1383 || ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *"
1384 ) 1447 )
1385 { 1448 {
1386 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type); 1449 attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type);
@@ -1404,6 +1467,16 @@ struct native_convert_return_generator
1404 return as_generator("return _ret_var.Handle;") 1467 return as_generator("return _ret_var.Handle;")
1405 .generate(sink, attributes::unused, context); 1468 .generate(sink, attributes::unused, context);
1406 } 1469 }
1470 else if (ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *")
1471 {
1472 return as_generator("return Efl.Eo.Globals.IEnumerableToAccessor(_ret_var);")
1473 .generate(sink, attributes::unused, context);
1474 }
1475 else if (ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *")
1476 {
1477 return as_generator("return Efl.Eo.Globals.IEnumerableToIterator(_ret_var);")
1478 .generate(sink, attributes::unused, context);
1479 }
1407 else if (ret_type.c_type != "void") 1480 else if (ret_type.c_type != "void")
1408 return as_generator("return _ret_var;").generate(sink, ret_type, context); 1481 return as_generator("return _ret_var;").generate(sink, ret_type, context);
1409 return true; 1482 return true;
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 403778fcc1..1267a8d38c 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -69,9 +69,15 @@ 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 == "iterator")))
73 {
74 if (!as_generator(
75 indent << scope_tab << scope_tab << "_internal_struct." << string << " = Efl.Eo.Globals.IEnumerableToIterator(_external_struct." << string << ");\n")
76 .generate(sink, std::make_tuple(field_name, field_name), context))
77 return false;
78 }
72 else if ((complex && (complex->outer.base_type == "array" 79 else if ((complex && (complex->outer.base_type == "array"
73 || complex->outer.base_type == "list" 80 || complex->outer.base_type == "list"
74 || complex->outer.base_type == "iterator"
75 || complex->outer.base_type == "hash")) 81 || complex->outer.base_type == "hash"))
76 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") 82 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *")
77 { 83 {
@@ -206,7 +212,7 @@ struct to_external_field_convert_generator
206 else if (complex && complex->outer.base_type == "iterator") 212 else if (complex && complex->outer.base_type == "iterator")
207 { 213 {
208 if (!as_generator( 214 if (!as_generator(
209 indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false);\n") 215 indent << scope_tab << scope_tab << "_external_struct." << string << " = Efl.Eo.Globals.IteratorTo" << type << "(_internal_struct." << string << ");\n")
210 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 216 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
211 return false; 217 return false;
212 } 218 }
diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh
index fb521f273e..f365a0d5a8 100644
--- a/src/bin/eolian_mono/eolian/mono/type_impl.hh
+++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh
@@ -393,14 +393,14 @@ struct visitor_generate
393 , {"iterator", nullptr, nullptr, [&] 393 , {"iterator", nullptr, nullptr, [&]
394 { 394 {
395 complex_type_def c = complex; 395 complex_type_def c = complex;
396 c.outer.base_type = "Eina.Iterator"; 396 c.outer.base_type = "IEnumerable";
397 return c; 397 return c;
398 } 398 }
399 } 399 }
400 , {"accessor", nullptr, nullptr, [&] 400 , {"accessor", nullptr, nullptr, [&]
401 { 401 {
402 complex_type_def c = complex; 402 complex_type_def c = complex;
403 c.outer.base_type = "Eina.Accessor"; 403 c.outer.base_type = "IEnumerable";
404 return c; 404 return c;
405 } 405 }
406 } 406 }
diff --git a/src/bindings/mono/efl_mono/GenericModel.cs b/src/bindings/mono/efl_mono/GenericModel.cs
index 5f333746f4..8d7cc813a2 100644
--- a/src/bindings/mono/efl_mono/GenericModel.cs
+++ b/src/bindings/mono/efl_mono/GenericModel.cs
@@ -31,7 +31,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
31 } 31 }
32 32
33 /// <summary>The list of properties available in the wrapped model.</summary> 33 /// <summary>The list of properties available in the wrapped model.</summary>
34 public Eina.Iterator< System.String> Properties 34 public IEnumerable<System.String> Properties
35 { 35 {
36 get { return GetProperties(); } 36 get { return GetProperties(); }
37 } 37 }
@@ -44,7 +44,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
44 44
45 /// <summary>The list of properties available in the wrapped model.</summary> 45 /// <summary>The list of properties available in the wrapped model.</summary>
46 /// <returns>The list of properties in the model.</returns> 46 /// <returns>The list of properties in the model.</returns>
47 public Eina.Iterator<System.String> GetProperties() 47 public IEnumerable<System.String> GetProperties()
48 { 48 {
49 return model.GetProperties(); 49 return model.GetProperties();
50 } 50 }
diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs
index 63d9aacae8..440734a458 100644
--- a/src/bindings/mono/efl_mono/efl_csharp_application.cs
+++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs
@@ -199,7 +199,8 @@ public abstract class Application
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 Eina.Array<Eina.Stringshare>();
202 command_line.Append(Array.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#if EFL_BETA 204#if EFL_BETA
204 app.SetCommandArray(command_line); 205 app.SetCommandArray(command_line);
205#endif 206#endif
diff --git a/src/bindings/mono/eina_mono/eina_accessor.cs b/src/bindings/mono/eina_mono/eina_accessor.cs
index 64b4216a15..7c8b52c561 100644
--- a/src/bindings/mono/eina_mono/eina_accessor.cs
+++ b/src/bindings/mono/eina_mono/eina_accessor.cs
@@ -28,8 +28,10 @@ namespace Eina
28 28
29internal class AccessorNativeFunctions 29internal class AccessorNativeFunctions
30{ 30{
31 [DllImport(efl.Libs.Eina)] public static extern IntPtr
32 eina_carray_length_accessor_new(IntPtr array, uint step, uint length);
31 [DllImport(efl.Libs.Eina)] [return: MarshalAs(UnmanagedType.U1)] public static extern bool 33 [DllImport(efl.Libs.Eina)] [return: MarshalAs(UnmanagedType.U1)] public static extern bool
32 eina_accessor_data_get(IntPtr accessor, uint position, IntPtr data); 34 eina_accessor_data_get(IntPtr accessor, uint position, out IntPtr data);
33 [DllImport(efl.Libs.Eina)] public static extern void 35 [DllImport(efl.Libs.Eina)] public static extern void
34 eina_accessor_free(IntPtr accessor); 36 eina_accessor_free(IntPtr accessor);
35} 37}
@@ -145,6 +147,7 @@ public class Accessor<T> : IEnumerable<T>, IDisposable
145 /// <returns>An enumerator to walk through the acessor items.</returns> 147 /// <returns>An enumerator to walk through the acessor items.</returns>
146 public IEnumerator<T> GetEnumerator() 148 public IEnumerator<T> GetEnumerator()
147 { 149 {
150/*
148 if (Handle == IntPtr.Zero) 151 if (Handle == IntPtr.Zero)
149 { 152 {
150 throw new ObjectDisposedException(base.GetType().Name); 153 throw new ObjectDisposedException(base.GetType().Name);
@@ -152,7 +155,6 @@ public class Accessor<T> : IEnumerable<T>, IDisposable
152 155
153 IntPtr tmp = MemoryNative.Alloc(Marshal.SizeOf(typeof(IntPtr))); 156 IntPtr tmp = MemoryNative.Alloc(Marshal.SizeOf(typeof(IntPtr)));
154 uint position = 0; 157 uint position = 0;
155
156 try 158 try
157 { 159 {
158 while (eina_accessor_data_get(Handle, position, tmp)) 160 while (eina_accessor_data_get(Handle, position, tmp))
@@ -166,6 +168,8 @@ public class Accessor<T> : IEnumerable<T>, IDisposable
166 { 168 {
167 MemoryNative.Free(tmp); 169 MemoryNative.Free(tmp);
168 } 170 }
171*/
172 yield break;
169 } 173 }
170 174
171 IEnumerator IEnumerable.GetEnumerator() 175 IEnumerator IEnumerable.GetEnumerator()
diff --git a/src/bindings/mono/eina_mono/eina_iterator.cs b/src/bindings/mono/eina_mono/eina_iterator.cs
index fb73f88344..6f4f169cef 100644
--- a/src/bindings/mono/eina_mono/eina_iterator.cs
+++ b/src/bindings/mono/eina_mono/eina_iterator.cs
@@ -44,6 +44,8 @@ public static class IteratorNativeFunctions
44 44
45 [DllImport(efl.Libs.Eina)] internal static extern IntPtr 45 [DllImport(efl.Libs.Eina)] internal static extern IntPtr
46 eina_carray_iterator_new(IntPtr array); 46 eina_carray_iterator_new(IntPtr array);
47 [DllImport(efl.Libs.Eina)] internal static extern IntPtr
48 eina_carray_length_iterator_new(IntPtr array, uint step, uint length);
47} 49}
48 50
49/// <summary>Wrapper around a native Eina iterator. 51/// <summary>Wrapper around a native Eina iterator.
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index c84433c23e..8d316181c5 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -759,6 +759,92 @@ public static class Globals
759 Monitor.Exit(Efl.All.InitLock); 759 Monitor.Exit(Efl.All.InitLock);
760 } 760 }
761 761
762 internal static IEnumerable<T> AccessorToIEnumerable<T>(IntPtr accessor)
763 {
764 if (accessor == IntPtr.Zero)
765 throw new ArgumentException("accessor is null", nameof(accessor));
766
767 IntPtr data = IntPtr.Zero;
768 uint position = 0;
769
770 while (Eina.AccessorNativeFunctions.eina_accessor_data_get(accessor, position, out data))
771 {
772 yield return Eina.TraitFunctions.NativeToManaged<T>(data);
773 position += 1;
774 }
775 }
776
777 internal static IntPtr IEnumerableToAccessor<T>(IEnumerable<T> enumerable)
778 {
779 if (enumerable == null)
780 throw new ArgumentException("enumerable is null", nameof(enumerable));
781 IntPtr[] intPtrs = new IntPtr[enumerable.Count()];
782
783 int i = 0;
784 foreach (T data in enumerable)
785 {
786 intPtrs[i] = Eina.TraitFunctions.ManagedToNativeAlloc<T>(data);
787 i++;
788 }
789 IntPtr[] dataArray = intPtrs.ToArray();
790 GCHandle pinnedArray = GCHandle.Alloc(dataArray, GCHandleType.Pinned); //FIXME: Need to free.
791 return Eina.AccessorNativeFunctions.eina_carray_length_accessor_new(pinnedArray.AddrOfPinnedObject(), (uint)(IntPtr.Size), (uint)dataArray.Length);
792 }
793
794 internal static IEnumerable<T> IteratorToIEnumerable<T>(IntPtr iterator)
795 {
796 if (iterator == IntPtr.Zero)
797 throw new ArgumentException("iterator is null", nameof(iterator));
798
799 while (Eina.IteratorNativeFunctions.eina_iterator_next(iterator, out IntPtr data))
800 {
801 yield return Eina.TraitFunctions.NativeToManaged<T>(data);
802 }
803 }
804
805 internal static IntPtr IEnumerableToIterator<T>(IEnumerable<T> enumerable)
806 {
807 if (enumerable == null)
808 throw new ArgumentException("enumerable is null", nameof(enumerable));
809
810 var list = new List<IntPtr>();
811 //IntPtr[] intPtrs = new IntPtr[enumerable.Count()];
812
813 foreach (T data in enumerable)
814 {
815 list.Add(Eina.TraitFunctions.ManagedToNativeAlloc<T>(data));
816 }
817
818 IntPtr[] dataArray = list.ToArray();
819 GCHandle pinnedArray = GCHandle.Alloc(dataArray, GCHandleType.Pinned); //FIXME: Need to free.
820 return Eina.IteratorNativeFunctions.eina_carray_length_iterator_new(pinnedArray.AddrOfPinnedObject(), (uint)(IntPtr.Size), (uint)dataArray.Length);
821 }
822
823 internal static IEnumerable<T> ListToIEnumerable<T>(IntPtr list)
824 {
825 if (list == IntPtr.Zero)
826 throw new ArgumentException("list is null", nameof(list));
827
828 IntPtr l;
829
830 for (l = list; l != IntPtr.Zero; l = Eina.ListNativeFunctions.eina_list_next_custom_export_mono(l))
831 {
832 yield return Eina.TraitFunctions.NativeToManaged<T>(Eina.ListNativeFunctions.eina_list_data_get_custom_export_mono(l));
833 }
834 }
835
836 internal static IntPtr IEnumerableToList<T>(IEnumerable<T> enumerable)
837 {
838 if (enumerable == null)
839 throw new ArgumentException("enumerable is null", nameof(enumerable));
840
841 IntPtr list = IntPtr.Zero;
842 foreach (T data in enumerable)
843 {
844 list = Eina.ListNativeFunctions.eina_list_append(list, Eina.TraitFunctions.ManagedToNativeAlloc(data)); //FIXME: need to free
845 }
846 return list;
847 }
762 848
763 849
764} // Globals 850} // Globals
diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs
index 16d65a8205..e3c9159a33 100644
--- a/src/tests/efl_mono/Eina.cs
+++ b/src/tests/efl_mono/Eina.cs
@@ -4118,12 +4118,10 @@ class TestEinaIterator
4118 public static void test_eina_iterator_int_out() 4118 public static void test_eina_iterator_int_out()
4119 { 4119 {
4120 var t = new Dummy.TestObject(); 4120 var t = new Dummy.TestObject();
4121 Eina.Iterator<int> itr; 4121 IEnumerable<int> itr;
4122 4122
4123 Test.Assert(t.EinaIteratorIntOut(out itr)); 4123 Test.Assert(t.EinaIteratorIntOut(out itr));
4124 4124
4125 Test.Assert(!itr.Own);
4126
4127 int idx = 0; 4125 int idx = 0;
4128 foreach (int e in itr) 4126 foreach (int e in itr)
4129 { 4127 {
@@ -4132,8 +4130,6 @@ class TestEinaIterator
4132 } 4130 }
4133 Test.AssertEquals(idx, base_seq_int.Length); 4131 Test.AssertEquals(idx, base_seq_int.Length);
4134 4132
4135 itr.Dispose();
4136
4137 Test.Assert(t.CheckEinaIteratorIntOut()); 4133 Test.Assert(t.CheckEinaIteratorIntOut());
4138 t.Dispose(); 4134 t.Dispose();
4139 } 4135 }
@@ -4141,12 +4137,10 @@ class TestEinaIterator
4141 public static void test_eina_iterator_int_out_own() 4137 public static void test_eina_iterator_int_out_own()
4142 { 4138 {
4143 var t = new Dummy.TestObject(); 4139 var t = new Dummy.TestObject();
4144 Eina.Iterator<int> itr; 4140 IEnumerable<int> itr;
4145 4141
4146 Test.Assert(t.EinaIteratorIntOutOwn(out itr)); 4142 Test.Assert(t.EinaIteratorIntOutOwn(out itr));
4147 4143
4148 Test.Assert(itr.Own);
4149
4150 int idx = 0; 4144 int idx = 0;
4151 foreach (int e in itr) 4145 foreach (int e in itr)
4152 { 4146 {
@@ -4155,7 +4149,6 @@ class TestEinaIterator
4155 } 4149 }
4156 Test.AssertEquals(idx, base_seq_int.Length); 4150 Test.AssertEquals(idx, base_seq_int.Length);
4157 4151
4158 itr.Dispose();
4159 t.Dispose(); 4152 t.Dispose();
4160 } 4153 }
4161 4154
@@ -4165,8 +4158,6 @@ class TestEinaIterator
4165 4158
4166 var itr = t.EinaIteratorIntReturn(); 4159 var itr = t.EinaIteratorIntReturn();
4167 4160
4168 Test.Assert(!itr.Own);
4169
4170 int idx = 0; 4161 int idx = 0;
4171 foreach (int e in itr) 4162 foreach (int e in itr)
4172 { 4163 {
@@ -4175,8 +4166,6 @@ class TestEinaIterator
4175 } 4166 }
4176 Test.AssertEquals(idx, base_seq_int.Length); 4167 Test.AssertEquals(idx, base_seq_int.Length);
4177 4168
4178 itr.Dispose();
4179
4180 Test.Assert(t.CheckEinaIteratorIntReturn()); 4169 Test.Assert(t.CheckEinaIteratorIntReturn());
4181 t.Dispose(); 4170 t.Dispose();
4182 } 4171 }
@@ -4187,8 +4176,6 @@ class TestEinaIterator
4187 4176
4188 var itr = t.EinaIteratorIntReturnOwn(); 4177 var itr = t.EinaIteratorIntReturnOwn();
4189 4178
4190 Test.Assert(itr.Own);
4191
4192 int idx = 0; 4179 int idx = 0;
4193 foreach (int e in itr) 4180 foreach (int e in itr)
4194 { 4181 {
@@ -4197,7 +4184,6 @@ class TestEinaIterator
4197 } 4184 }
4198 Test.AssertEquals(idx, base_seq_int.Length); 4185 Test.AssertEquals(idx, base_seq_int.Length);
4199 4186
4200 itr.Dispose();
4201 t.Dispose(); 4187 t.Dispose();
4202 } 4188 }
4203 4189
@@ -4252,12 +4238,10 @@ class TestEinaIterator
4252 public static void test_eina_iterator_str_out() 4238 public static void test_eina_iterator_str_out()
4253 { 4239 {
4254 var t = new Dummy.TestObject(); 4240 var t = new Dummy.TestObject();
4255 Eina.Iterator<string> itr; 4241 IEnumerable<string> itr;
4256 4242
4257 Test.Assert(t.EinaIteratorStrOut(out itr)); 4243 Test.Assert(t.EinaIteratorStrOut(out itr));
4258 4244
4259 Test.Assert(!itr.Own);
4260
4261 int idx = 0; 4245 int idx = 0;
4262 foreach (string e in itr) 4246 foreach (string e in itr)
4263 { 4247 {
@@ -4266,8 +4250,6 @@ class TestEinaIterator
4266 } 4250 }
4267 Test.AssertEquals(idx, base_seq_str.Length); 4251 Test.AssertEquals(idx, base_seq_str.Length);
4268 4252
4269 itr.Dispose();
4270
4271 Test.Assert(t.CheckEinaIteratorStrOut()); 4253 Test.Assert(t.CheckEinaIteratorStrOut());
4272 t.Dispose(); 4254 t.Dispose();
4273 } 4255 }
@@ -4275,12 +4257,10 @@ class TestEinaIterator
4275 public static void test_eina_iterator_str_out_own() 4257 public static void test_eina_iterator_str_out_own()
4276 { 4258 {
4277 var t = new Dummy.TestObject(); 4259 var t = new Dummy.TestObject();
4278 Eina.Iterator<string> itr; 4260 IEnumerable<string> itr;
4279 4261
4280 Test.Assert(t.EinaIteratorStrOutOwn(out itr)); 4262 Test.Assert(t.EinaIteratorStrOutOwn(out itr));
4281 4263
4282 Test.Assert(itr.Own);
4283
4284 int idx = 0; 4264 int idx = 0;
4285 foreach (string e in itr) 4265 foreach (string e in itr)
4286 { 4266 {
@@ -4289,7 +4269,6 @@ class TestEinaIterator
4289 } 4269 }
4290 Test.AssertEquals(idx, base_seq_str.Length); 4270 Test.AssertEquals(idx, base_seq_str.Length);
4291 4271
4292 itr.Dispose();
4293 t.Dispose(); 4272 t.Dispose();
4294 } 4273 }
4295 4274
@@ -4299,8 +4278,6 @@ class TestEinaIterator
4299 4278
4300 var itr = t.EinaIteratorStrReturn(); 4279 var itr = t.EinaIteratorStrReturn();
4301 4280
4302 Test.Assert(!itr.Own);
4303
4304 int idx = 0; 4281 int idx = 0;
4305 foreach (string e in itr) 4282 foreach (string e in itr)
4306 { 4283 {
@@ -4309,8 +4286,6 @@ class TestEinaIterator
4309 } 4286 }
4310 Test.AssertEquals(idx, base_seq_str.Length); 4287 Test.AssertEquals(idx, base_seq_str.Length);
4311 4288
4312 itr.Dispose();
4313
4314 Test.Assert(t.CheckEinaIteratorStrReturn()); 4289 Test.Assert(t.CheckEinaIteratorStrReturn());
4315 t.Dispose(); 4290 t.Dispose();
4316 } 4291 }
@@ -4321,8 +4296,6 @@ class TestEinaIterator
4321 4296
4322 var itr = t.EinaIteratorStrReturnOwn(); 4297 var itr = t.EinaIteratorStrReturnOwn();
4323 4298
4324 Test.Assert(itr.Own);
4325
4326 int idx = 0; 4299 int idx = 0;
4327 foreach (string e in itr) 4300 foreach (string e in itr)
4328 { 4301 {
@@ -4331,7 +4304,6 @@ class TestEinaIterator
4331 } 4304 }
4332 Test.AssertEquals(idx, base_seq_str.Length); 4305 Test.AssertEquals(idx, base_seq_str.Length);
4333 4306
4334 itr.Dispose();
4335 t.Dispose(); 4307 t.Dispose();
4336 } 4308 }
4337 4309
@@ -4386,12 +4358,10 @@ class TestEinaIterator
4386 public static void test_eina_iterator_strshare_out() 4358 public static void test_eina_iterator_strshare_out()
4387 { 4359 {
4388 var t = new Dummy.TestObject(); 4360 var t = new Dummy.TestObject();
4389 Eina.Iterator<Eina.Stringshare> itr; 4361 IEnumerable<Eina.Stringshare> itr;
4390 4362
4391 Test.Assert(t.EinaIteratorStrshareOut(out itr)); 4363 Test.Assert(t.EinaIteratorStrshareOut(out itr));
4392 4364
4393 Test.Assert(!itr.Own);
4394
4395 int idx = 0; 4365 int idx = 0;
4396 foreach (Eina.Stringshare e in itr) 4366 foreach (Eina.Stringshare e in itr)
4397 { 4367 {
@@ -4400,8 +4370,6 @@ class TestEinaIterator
4400 } 4370 }
4401 Test.AssertEquals(idx, base_seq_strshare.Length); 4371 Test.AssertEquals(idx, base_seq_strshare.Length);
4402 4372
4403 itr.Dispose();
4404
4405 Test.Assert(t.CheckEinaIteratorStrshareOut()); 4373 Test.Assert(t.CheckEinaIteratorStrshareOut());
4406 t.Dispose(); 4374 t.Dispose();
4407 } 4375 }
@@ -4409,12 +4377,10 @@ class TestEinaIterator
4409 public static void test_eina_iterator_strshare_out_own() 4377 public static void test_eina_iterator_strshare_out_own()
4410 { 4378 {
4411 var t = new Dummy.TestObject(); 4379 var t = new Dummy.TestObject();
4412 Eina.Iterator<Eina.Stringshare> itr; 4380 IEnumerable<Eina.Stringshare> itr;
4413 4381
4414 Test.Assert(t.EinaIteratorStrshareOutOwn(out itr)); 4382 Test.Assert(t.EinaIteratorStrshareOutOwn(out itr));
4415 4383
4416 Test.Assert(itr.Own);
4417
4418 int idx = 0; 4384 int idx = 0;
4419 foreach (Eina.Stringshare e in itr) 4385 foreach (Eina.Stringshare e in itr)
4420 { 4386 {
@@ -4423,7 +4389,6 @@ class TestEinaIterator
4423 } 4389 }
4424 Test.AssertEquals(idx, base_seq_strshare.Length); 4390 Test.AssertEquals(idx, base_seq_strshare.Length);
4425 4391
4426 itr.Dispose();
4427 t.Dispose(); 4392 t.Dispose();
4428 } 4393 }
4429 4394
@@ -4433,8 +4398,6 @@ class TestEinaIterator
4433 4398
4434 var itr = t.EinaIteratorStrshareReturn(); 4399 var itr = t.EinaIteratorStrshareReturn();
4435 4400
4436 Test.Assert(!itr.Own);
4437
4438 int idx = 0; 4401 int idx = 0;
4439 foreach (Eina.Stringshare e in itr) 4402 foreach (Eina.Stringshare e in itr)
4440 { 4403 {
@@ -4443,8 +4406,6 @@ class TestEinaIterator
4443 } 4406 }
4444 Test.AssertEquals(idx, base_seq_strshare.Length); 4407 Test.AssertEquals(idx, base_seq_strshare.Length);
4445 4408
4446 itr.Dispose();
4447
4448 Test.Assert(t.CheckEinaIteratorStrshareReturn()); 4409 Test.Assert(t.CheckEinaIteratorStrshareReturn());
4449 t.Dispose(); 4410 t.Dispose();
4450 } 4411 }
@@ -4455,8 +4416,6 @@ class TestEinaIterator
4455 4416
4456 var itr = t.EinaIteratorStrshareReturnOwn(); 4417 var itr = t.EinaIteratorStrshareReturnOwn();
4457 4418
4458 Test.Assert(itr.Own);
4459
4460 int idx = 0; 4419 int idx = 0;
4461 foreach (Eina.Stringshare e in itr) 4420 foreach (Eina.Stringshare e in itr)
4462 { 4421 {
@@ -4465,7 +4424,6 @@ class TestEinaIterator
4465 } 4424 }
4466 Test.AssertEquals(idx, base_seq_strshare.Length); 4425 Test.AssertEquals(idx, base_seq_strshare.Length);
4467 4426
4468 itr.Dispose();
4469 t.Dispose(); 4427 t.Dispose();
4470 } 4428 }
4471 4429
@@ -4520,12 +4478,10 @@ class TestEinaIterator
4520 public static void test_eina_iterator_obj_out() 4478 public static void test_eina_iterator_obj_out()
4521 { 4479 {
4522 var t = new Dummy.TestObject(); 4480 var t = new Dummy.TestObject();
4523 Eina.Iterator<Dummy.Numberwrapper> itr; 4481 IEnumerable<Dummy.Numberwrapper> itr;
4524 4482
4525 Test.Assert(t.EinaIteratorObjOut(out itr)); 4483 Test.Assert(t.EinaIteratorObjOut(out itr));
4526 4484
4527 Test.Assert(!itr.Own);
4528
4529 var base_seq_obj = BaseSeqObj(); 4485 var base_seq_obj = BaseSeqObj();
4530 4486
4531 int idx = 0; 4487 int idx = 0;
@@ -4536,8 +4492,6 @@ class TestEinaIterator
4536 } 4492 }
4537 Test.AssertEquals(idx, base_seq_obj.Length); 4493 Test.AssertEquals(idx, base_seq_obj.Length);
4538 4494
4539 itr.Dispose();
4540
4541 Test.Assert(t.CheckEinaIteratorObjOut()); 4495 Test.Assert(t.CheckEinaIteratorObjOut());
4542 t.Dispose(); 4496 t.Dispose();
4543 } 4497 }
@@ -4545,12 +4499,10 @@ class TestEinaIterator
4545 public static void test_eina_iterator_obj_out_own() 4499 public static void test_eina_iterator_obj_out_own()
4546 { 4500 {
4547 var t = new Dummy.TestObject(); 4501 var t = new Dummy.TestObject();
4548 Eina.Iterator<Dummy.Numberwrapper> itr; 4502 IEnumerable<Dummy.Numberwrapper> itr;
4549 4503
4550 Test.Assert(t.EinaIteratorObjOutOwn(out itr)); 4504 Test.Assert(t.EinaIteratorObjOutOwn(out itr));
4551 4505
4552 Test.Assert(itr.Own);
4553
4554 var base_seq_obj = BaseSeqObj(); 4506 var base_seq_obj = BaseSeqObj();
4555 4507
4556 int idx = 0; 4508 int idx = 0;
@@ -4561,7 +4513,6 @@ class TestEinaIterator
4561 } 4513 }
4562 Test.AssertEquals(idx, base_seq_obj.Length); 4514 Test.AssertEquals(idx, base_seq_obj.Length);
4563 4515
4564 itr.Dispose();
4565 t.Dispose(); 4516 t.Dispose();
4566 } 4517 }
4567 4518
@@ -4571,8 +4522,6 @@ class TestEinaIterator
4571 4522
4572 var itr = t.EinaIteratorObjReturn(); 4523 var itr = t.EinaIteratorObjReturn();
4573 4524
4574 Test.Assert(!itr.Own);
4575
4576 var base_seq_obj = BaseSeqObj(); 4525 var base_seq_obj = BaseSeqObj();
4577 4526
4578 int idx = 0; 4527 int idx = 0;
@@ -4583,8 +4532,6 @@ class TestEinaIterator
4583 } 4532 }
4584 Test.AssertEquals(idx, base_seq_obj.Length); 4533 Test.AssertEquals(idx, base_seq_obj.Length);
4585 4534
4586 itr.Dispose();
4587
4588 Test.Assert(t.CheckEinaIteratorObjReturn()); 4535 Test.Assert(t.CheckEinaIteratorObjReturn());
4589 t.Dispose(); 4536 t.Dispose();
4590 } 4537 }
@@ -4595,8 +4542,6 @@ class TestEinaIterator
4595 4542
4596 var itr = t.EinaIteratorObjReturnOwn(); 4543 var itr = t.EinaIteratorObjReturnOwn();
4597 4544
4598 Test.Assert(itr.Own);
4599
4600 var base_seq_obj = BaseSeqObj(); 4545 var base_seq_obj = BaseSeqObj();
4601 4546
4602 int idx = 0; 4547 int idx = 0;
@@ -4607,7 +4552,6 @@ class TestEinaIterator
4607 } 4552 }
4608 Test.AssertEquals(idx, base_seq_obj.Length); 4553 Test.AssertEquals(idx, base_seq_obj.Length);
4609 4554
4610 itr.Dispose();
4611 t.Dispose(); 4555 t.Dispose();
4612 } 4556 }
4613} // < TestEinaIterator 4557} // < TestEinaIterator
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index 14774290d3..e946f6cf37 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -265,7 +265,7 @@ class TestEoAccessors
265 lst.Append(3); 265 lst.Append(3);
266 lst.Append(2); 266 lst.Append(2);
267 lst.Append(5); 267 lst.Append(5);
268 Eina.Accessor<int> acc = obj.CloneAccessor(lst.GetAccessor()); 268 IEnumerable<int> acc = obj.CloneAccessor(lst.GetAccessor());
269 269
270 var zipped = acc.Zip(lst, (first, second) => new Tuple<int, int>(first, second)); 270 var zipped = acc.Zip(lst, (first, second) => new Tuple<int, int>(first, second));
271 271