summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2020-01-06 19:07:28 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2020-01-06 19:07:28 +0900
commit1507ade7875ad485cedb49c0d32ce510685bd0e1 (patch)
treefab209b5c9ce8b90efc6a3e5d788edb689947aba /src/bin
parent207da69c97d86ccd6f1e354b60b579a3d81f375c (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 478c6a9..6c6fd90 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
397 if (extension_method_stream.tellp() <= 0) 397 if (extension_method_stream.tellp() <= 0)
398 return true; 398 return true;
399 399
400 if (!name_helpers::open_namespaces(sink, cls.namespaces, context))
401 return false;
402
400 if(!as_generator 403 if(!as_generator
401 (lit("#if EFL_BETA\n") 404 (lit("#if EFL_BETA\n")
402 << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx will hide these classes 405 << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx will hide these classes
403 <<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls) 406 << "public static class " << name_helpers::klass_concrete_name(cls)
404 << "_ExtensionMethods {\n" 407 << "ExtensionMethods {\n"
405 << extension_method_stream.str() 408 << extension_method_stream.str()
406 << "}\n" 409 << "}\n"
407 << "#pragma warning restore CS1591\n" 410 << "#pragma warning restore CS1591\n"
@@ -409,6 +412,9 @@ struct klass
409 .generate(sink, cls.namespaces, context)) 412 .generate(sink, cls.namespaces, context))
410 return false; 413 return false;
411 414
415 if (!name_helpers::close_namespaces(sink, cls.namespaces, context))
416 return false;
417
412 return true; 418 return true;
413 } 419 }
414 420