eolian_mono: add namespace to extension methods of ItemFactory
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 6 Jan 2020 10:07:28 +0000 (19:07 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 6 Jan 2020 21:28:52 +0000 (06:28 +0900)
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
src/tests/efl_mono/Model.cs
src/tests/efl_mono/Parts.cs

index 8656178..cc32e82 100644 (file)
@@ -401,11 +401,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"
@@ -413,6 +416,9 @@ struct klass
         .generate(sink, cls.namespaces, context))
      return false;
 
+     if (!name_helpers::close_namespaces(sink, cls.namespaces, context))
+       return false;
+
      return true;
    }
 
index bb6ba3b..69596af 100644 (file)
@@ -3,6 +3,7 @@
 using System;
 using System.Threading.Tasks;
 using System.Diagnostics.CodeAnalysis;
+using Efl.Ui;
 
 #if EFL_BETA
 
index 3e2da24..e206681 100644 (file)
@@ -19,6 +19,7 @@
 
 using System;
 using System.Diagnostics.CodeAnalysis;
+using Efl.Ui;
 
 namespace TestSuite {