lauromoura pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=01875756ebacc3e4578106f638ca7e57cdcd21f0

commit 01875756ebacc3e4578106f638ca7e57cdcd21f0
Author: Jaehyun Cho <[email protected]>
Date:   Fri Sep 20 19:14:02 2019 -0300

    eolian_mono: add more verbs to generate C# method beginning with verb
    
    Summary:
    C# language binding generates C# method name beginning with verb by
    checking verb list in name_helpers.hh.
    
    Some verbs used in eo method are missing in the current verb list. So
    they are added into the verb list.
    
    In this scheme, there is a problem that some words can be used as a verb
    in some methods but they also can be used as a noun in other methods.
    (e.g. drag_start as a verb / cursor_word_start as a noun)
    
    So "start" and "scroll" are not added to verb list in this patch.
    To resolve the above problem, we may need a new eo syntax to rename or
    reverse the name in language bindings.
    
    Test Plan: Check C# method names in .eo.cs files if the name begins with 
verb.
    
    Reviewers: felipealmeida, SanghyeonLee, woohyun, Jaehyun_Cho, segfaultxavi
    
    Reviewed By: segfaultxavi
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D10001
---
 src/bin/eolian_mono/eolian/mono/name_helpers.hh | 37 ++++++++++++++++++++++++-
 src/bindings/mono/efl_mono/Bind.cs              |  6 ++--
 src/tests/efl_mono/Parts.cs                     |  2 +-
 3 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh 
b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index b2063116e0..e68de6bf66 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -123,7 +123,42 @@ static const std::vector<std::string> verbs =
     "unpack",
     "emit",
     "call",
-    "append"
+    "append",
+    "apply",
+    "bind",
+    "cancel",
+    "copy",
+    "create",
+    "cut",
+    "delete",
+    "deselect",
+    "detach",
+    "do",
+    "gen",
+    "insert",
+    "iterate",
+    "join",
+    "leave",
+    "limit",
+    "paste",
+    "parse",
+    "prepend",
+    "process",
+    "query",
+    "refresh",
+    "remove",
+    "register",
+    "reject",
+    "release",
+    "reply",
+    "send",
+    "select",
+    "serialize",
+    "steal",
+    "sync",
+    "toggle",
+    "unbind",
+    "unregister"
   };
 
 const std::vector<std::string> not_verbs =
diff --git a/src/bindings/mono/efl_mono/Bind.cs 
b/src/bindings/mono/efl_mono/Bind.cs
index 1d29c25d42..14c45d9dd0 100644
--- a/src/bindings/mono/efl_mono/Bind.cs
+++ b/src/bindings/mono/efl_mono/Bind.cs
@@ -37,7 +37,7 @@ public class BindableProperty<T>
     {
         if (this.partName == null)
         {
-            return this.binder.PropertyBind(this.propertyName, modelProperty);
+            return this.binder.BindProperty(this.propertyName, modelProperty);
         }
         else
         {
@@ -59,7 +59,7 @@ public class BindableProperty<T>
             var partBinder = partMethod.Invoke(partHolder, new System.Object[] 
{ this.partName }) as Efl.Ui.IPropertyBind;
             if (partBinder != null)
             {
-                return partBinder.PropertyBind(this.propertyName, 
modelProperty);
+                return partBinder.BindProperty(this.propertyName, 
modelProperty);
             }
             else
             {
@@ -112,7 +112,7 @@ public class BindableFactoryPart<T>
     /// <summary>Binds the given factory to this part.</summary>
     public Eina.Error BindFactory(Efl.Ui.IFactory factory)
     {
-        this.Binder.FactoryBind(this.PartName, factory);
+        this.Binder.BindFactory(this.PartName, factory);
         return Eina.Error.NO_ERROR;
     }
 }
diff --git a/src/tests/efl_mono/Parts.cs b/src/tests/efl_mono/Parts.cs
index a27c1b472e..14743ac634 100644
--- a/src/tests/efl_mono/Parts.cs
+++ b/src/tests/efl_mono/Parts.cs
@@ -55,7 +55,7 @@ public static class TestMVVMParts
     {
         var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>();
         var iconFactory = new Efl.Ui.ImageFactory(null);
-        iconFactory.PropertyBind("filename", "modelProperty");
+        iconFactory.BindProperty("filename", "modelProperty");
         var error = factory.IconPart().BindFactory(iconFactory);
 
         Test.AssertEquals(error, Eina.Error.NO_ERROR);

-- 


Reply via email to