jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1507ade7875ad485cedb49c0d32ce510685bd0e1

commit 1507ade7875ad485cedb49c0d32ce510685bd0e1
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Mon Jan 6 19:07:28 2020 +0900

    eolian_mono: add namespace to extension methods of ItemFactory
    
    Summary:
    Like other classes and methods, the classes and methods for extension
    methods of ItemFactory are moved inside the namespace.
    Consequently, the namespace in the class name for extension methods is
    removed to avoid duplicate namespace name.
    
    Reviewers: lauromoura, felipealmeida, YOhoho, woohyun
    
    Reviewed By: YOhoho
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D10972
---
 src/bin/eolian_mono/eolian/mono/klass.hh | 10 ++++++++--
 src/tests/efl_mono/Model.cs              |  1 +
 src/tests/efl_mono/Parts.cs              |  1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh 
b/src/bin/eolian_mono/eolian/mono/klass.hh
index 478c6a9c80..6c6fd906cd 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -397,11 +397,14 @@ struct klass
      if (extension_method_stream.tellp() <= 0)
        return true;
 
+     if (!name_helpers::open_namespaces(sink, cls.namespaces, context))
+       return false;
+
      if(!as_generator
         (lit("#if EFL_BETA\n")
          << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx 
will hide these classes
-         <<"public static class " << (string % "_") << 
name_helpers::klass_inherit_name(cls)
-         << "_ExtensionMethods {\n"
+         << "public static class " << name_helpers::klass_concrete_name(cls)
+         << "ExtensionMethods {\n"
          << extension_method_stream.str()
          << "}\n"
          << "#pragma warning restore CS1591\n"
@@ -409,6 +412,9 @@ struct klass
         .generate(sink, cls.namespaces, context))
      return false;
 
+     if (!name_helpers::close_namespaces(sink, cls.namespaces, context))
+       return false;
+
      return true;
    }
 
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index bb6ba3b01c..69596af25d 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -3,6 +3,7 @@
 using System;
 using System.Threading.Tasks;
 using System.Diagnostics.CodeAnalysis;
+using Efl.Ui;
 
 #if EFL_BETA
 
diff --git a/src/tests/efl_mono/Parts.cs b/src/tests/efl_mono/Parts.cs
index 3e2da24152..e206681e1a 100644
--- a/src/tests/efl_mono/Parts.cs
+++ b/src/tests/efl_mono/Parts.cs
@@ -19,6 +19,7 @@
 
 using System;
 using System.Diagnostics.CodeAnalysis;
+using Efl.Ui;
 
 namespace TestSuite {
 

-- 


Reply via email to