summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/part_definition.hh
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2020-01-22 11:33:41 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2020-01-22 14:44:08 +0900
commit700d87b3709c5eeb6fa7a238b24ae93e6fad4d68 (patch)
treea98c44c84ff80044581bbe188267b73ec8f6bf1c /src/bin/eolian_mono/eolian/mono/part_definition.hh
parentcade1b3c3ccacf9f47f5aeb366f5686eff232f6c (diff)
Revert "efl_mono: remove class ExtensionTag"
Extension Methods' classes have methods with same names and parameters. e.g. Text<T>(this Efl.Ui.ItemFactory<T> fac) Although the where clause contains different classes, they cannot be identified as different methods by C# compiler. e.g. Text<T>(this Efl.Ui.ItemFactory<T> fac) where T : Efl.Ui.Button e.g. Text<T>(this Efl.Ui.ItemFactory<T> fac) where T : Efl.Ui.Check As a result, to avoid ambiguous methods, ExtensionTag should be used as a second parameter of each method. e.g. Text<T>(this Efl.Ui.ItemFactory<T> fac, ExtensionTag<Efl.Ui.Button, T>magic = null) where T : Efl.Ui.Button e.g. Text<T>(this Efl.Ui.ItemFactory<T> fac, ExtensionTag<Efl.Ui.Check, T>magic = null) where T : Efl.Ui.Check This reverts commit 76631f502a8234c04ed8124bfdebe62ed5bdf954.
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/part_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh
index d87b0b56ac..4facf27209 100644
--- a/src/bin/eolian_mono/eolian/mono/part_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh
@@ -70,8 +70,9 @@ struct part_extension_method_definition_generator
70 bindableClass = "Efl.BindableFactoryPart"; 70 bindableClass = "Efl.BindableFactoryPart";
71 71
72 if (!as_generator( 72 if (!as_generator(
73 scope_tab(2) << "public static " << bindableClass << "<" << part_klass_name << "> " << name_helpers::managed_part_name(part) << "<T>(this Efl.Ui.ItemFactory<T> fac) where T : " 73 scope_tab(2) << "public static " << bindableClass << "<" << part_klass_name << "> " << name_helpers::managed_part_name(part) << "<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<"
74 << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n" 74 << name_helpers::klass_full_concrete_or_interface_name(cls)
75 << ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n"
75 << scope_tab(2) << "{\n" 76 << scope_tab(2) << "{\n"
76 << scope_tab(2) << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\", fac);\n" 77 << scope_tab(2) << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\", fac);\n"
77 << scope_tab(2) << "}\n\n" 78 << scope_tab(2) << "}\n\n"