summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-09-23 20:50:27 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-23 21:28:14 -0300
commit15897cd9c38002cfed85d312dd559c6fa4da4cb2 (patch)
tree24ed2310806f0194eb4a309670077a771d3aad2d /src/bin
parent7dcce72eb7bf248ff2d8b1b26a181f3a74392863 (diff)
efl-mono: Additional blank line between all methods.
Summary: For better indentation, adding a blank line in the end of methods. Test Plan: using efl_ui_layout.eo.cs, efl_access_object.eo.cs, efl_part.eo.cs and efl_ui_factory_bind.eo.cs as references, apply changes to the code then check the diffs of after and before of the references files Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, felipealmeida, lauromoura Tags: PHID-PROJ-uhnmnvlvunw6jgoqdnd4, #efl_language_bindings, #refactoring Maniphest Tasks: T8167 Differential Revision: https://phab.enlightenment.org/D9712
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_mono/eolian/mono/alias_definition.hh4
-rw-r--r--src/bin/eolian_mono/eolian/mono/documentation.hh7
-rw-r--r--src/bin/eolian_mono/eolian/mono/enum_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh11
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_declaration.hh4
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh30
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_helpers.hh34
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh24
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh24
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh6
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_fields.hh2
13 files changed, 75 insertions, 77 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
index 12d9ce7..d4a4b5d 100644
--- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
@@ -62,8 +62,8 @@ struct alias_definition_generator
62 << scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n" 62 << scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n"
63 << scope_tab << "{\n" 63 << scope_tab << "{\n"
64 << scope_tab << scope_tab << "return value.payload;\n" 64 << scope_tab << scope_tab << "return value.payload;\n"
65 << scope_tab << "}\n\n" 65 << scope_tab << "}\n"
66 << "}\n\n" 66 << "}\n"
67 ).generate(sink, alias, context)) 67 ).generate(sink, alias, context))
68 return false; 68 return false;
69 69
diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh
index 2b4ed87..234ce49 100644
--- a/src/bin/eolian_mono/eolian/mono/documentation.hh
+++ b/src/bin/eolian_mono/eolian/mono/documentation.hh
@@ -23,7 +23,7 @@ struct documentation_generator
23 23
24 int scope_size = 0; 24 int scope_size = 0;
25 25
26 documentation_generator(int scope_size) 26 documentation_generator(int scope_size = 0)
27 : scope_size(scope_size) {} 27 : scope_size(scope_size) {}
28 28
29 29
@@ -595,9 +595,8 @@ struct documentation_generator
595 else 595 else
596 ref = "<see cref=\"" + ref + "\" />"; 596 ref = "<see cref=\"" + ref + "\" />";
597 597
598 if (!as_generator( 598 if (!as_generator(scope_tab(scope_size) << "/// <param name=\"" << constructor_parameter_name(ctor) << "\">" << summary << " See " << ref << "</param>\n")
599 scope_tab << "/// <param name=\"" << constructor_parameter_name(ctor) << "\">" << summary << " See " << ref << "</param>\n" 599 .generate(sink, param, context))
600 ).generate(sink, param, context))
601 return false; 600 return false;
602 } 601 }
603 return true; 602 return true;
diff --git a/src/bin/eolian_mono/eolian/mono/enum_definition.hh b/src/bin/eolian_mono/eolian/mono/enum_definition.hh
index 4dae3cc..c5ab79a 100644
--- a/src/bin/eolian_mono/eolian/mono/enum_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/enum_definition.hh
@@ -45,7 +45,7 @@ struct enum_definition_generator
45 return false; 45 return false;
46 } 46 }
47 47
48 if(!as_generator("}\n\n").generate(sink, attributes::unused, context)) return false; 48 if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
49 49
50 if(!name_helpers::close_namespaces(sink, enum_.namespaces, context)) 50 if(!name_helpers::close_namespaces(sink, enum_.namespaces, context))
51 return false; 51 return false;
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index 14a7f9b..6c5f12e 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -255,7 +255,7 @@ struct event_argument_wrapper_generator
255 << scope_tab << "/// <summary>Actual event payload.</summary>\n" 255 << scope_tab << "/// <summary>Actual event payload.</summary>\n"
256 << scope_tab << "/// <value>" << documentation_string << "</value>\n" 256 << scope_tab << "/// <value>" << documentation_string << "</value>\n"
257 << scope_tab << "public " << type << " arg { get; set; }\n" 257 << scope_tab << "public " << type << " arg { get; set; }\n"
258 << "}\n" 258 << "}\n\n"
259 ).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context); 259 ).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context);
260 } 260 }
261} const event_argument_wrapper {}; 261} const event_argument_wrapper {};
@@ -279,9 +279,8 @@ struct event_declaration_generator
279 if (evt.type.is_engaged()) 279 if (evt.type.is_engaged())
280 wrapper_args_type = "<" + name_helpers::managed_event_args_name(evt) + ">"; 280 wrapper_args_type = "<" + name_helpers::managed_event_args_name(evt) + ">";
281 281
282 if (!as_generator( 282 if (!as_generator(documentation(1))
283 documentation(1) 283 .generate(sink, evt, context)) return false;
284 ).generate(sink, evt, context)) return false;
285 if (evt.type.is_engaged()) 284 if (evt.type.is_engaged())
286 if (!as_generator( 285 if (!as_generator(
287 scope_tab << "/// <value><see cref=\"" << name_helpers::managed_event_args_name(evt) << "\"/></value>\n" 286 scope_tab << "/// <value><see cref=\"" << name_helpers::managed_event_args_name(evt) << "\"/></value>\n"
@@ -427,7 +426,7 @@ struct event_definition_generator
427 << scope_tab << scope_tab << scope_tab << "return;\n" 426 << scope_tab << scope_tab << scope_tab << "return;\n"
428 << scope_tab << scope_tab << "}\n\n" 427 << scope_tab << scope_tab << "}\n\n"
429 << event_native_call 428 << event_native_call
430 << scope_tab << "}\n" 429 << scope_tab << "}\n\n"
431 ).generate(sink, nullptr, context)) 430 ).generate(sink, nullptr, context))
432 return false; 431 return false;
433 432
@@ -479,7 +478,7 @@ struct event_definition_generator
479 << scope_tab << scope_tab << scope_tab << scope_tab << "RemoveNativeEventHandler(" << library_name << ", key, value);\n" 478 << scope_tab << scope_tab << scope_tab << scope_tab << "RemoveNativeEventHandler(" << library_name << ", key, value);\n"
480 << scope_tab << scope_tab << scope_tab << "}\n" // End of lock block 479 << scope_tab << scope_tab << scope_tab << "}\n" // End of lock block
481 << scope_tab << scope_tab << "}\n" 480 << scope_tab << scope_tab << "}\n"
482 << scope_tab << "}\n" 481 << scope_tab << "}\n\n"
483 ).generate(sink, attributes::unused, context); 482 ).generate(sink, attributes::unused, context);
484 } 483 }
485}; 484};
diff --git a/src/bin/eolian_mono/eolian/mono/function_declaration.hh b/src/bin/eolian_mono/eolian/mono/function_declaration.hh
index 4532746..734700c 100644
--- a/src/bin/eolian_mono/eolian/mono/function_declaration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_declaration.hh
@@ -27,11 +27,11 @@ struct function_declaration_generator
27 if(f.scope != attributes::member_scope::scope_public) 27 if(f.scope != attributes::member_scope::scope_public)
28 return true; 28 return true;
29 29
30 if(!as_generator(documentation).generate(sink, f, context)) 30 if(!as_generator(documentation(1)).generate(sink, f, context))
31 return false; 31 return false;
32 32
33 return as_generator 33 return as_generator
34 (eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n") 34 (scope_tab << eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n\n")
35 .generate(sink, std::make_tuple(f.return_type, name_helpers::managed_method_name(f), f.parameters), context); 35 .generate(sink, std::make_tuple(f.return_type, name_helpers::managed_method_name(f), f.parameters), context);
36 } 36 }
37}; 37};
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index a0f28df..df72f2c 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -119,7 +119,7 @@ struct native_function_definition_generator
119 << indent << scope_tab << "var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);\n" 119 << indent << scope_tab << "var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);\n"
120 << indent << scope_tab << "if (ws != null)\n" 120 << indent << scope_tab << "if (ws != null)\n"
121 << indent << scope_tab << "{\n" 121 << indent << scope_tab << "{\n"
122 << eolian_mono::native_function_definition_preamble() 122 << indent << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble() << "\n"
123 << indent << scope_tab << scope_tab << "try\n" 123 << indent << scope_tab << scope_tab << "try\n"
124 << indent << scope_tab << scope_tab << "{\n" 124 << indent << scope_tab << scope_tab << "{\n"
125 << indent << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "") 125 << indent << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "")
@@ -131,7 +131,7 @@ struct native_function_definition_generator
131 << indent << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n" 131 << indent << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n"
132 << indent << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n" 132 << indent << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n"
133 << indent << scope_tab << scope_tab << "}\n\n" 133 << indent << scope_tab << scope_tab << "}\n\n"
134 << eolian_mono::native_function_definition_epilogue(*klass) << "\n" 134 << indent << eolian_mono::native_function_definition_epilogue(*klass) << "\n"
135 << indent << scope_tab << "}\n" 135 << indent << scope_tab << "}\n"
136 << indent << scope_tab << "else\n" 136 << indent << scope_tab << "else\n"
137 << indent << scope_tab << "{\n" 137 << indent << scope_tab << "{\n"
@@ -204,14 +204,14 @@ struct function_definition_generator
204 204
205 if(!as_generator 205 if(!as_generator
206 (scope_tab << eolian_mono::function_scope_get(f) << ((do_super && !f.is_static) ? "virtual " : "") << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ") 206 (scope_tab << eolian_mono::function_scope_get(f) << ((do_super && !f.is_static) ? "virtual " : "") << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ")
207 << ") {\n " 207 << ") {\n"
208 << eolian_mono::function_definition_preamble() 208 << scope_tab(2) << eolian_mono::function_definition_preamble()
209 << klass_full_native_inherit_name(f.klass) << "." << string << "_ptr.Value.Delegate(" 209 << klass_full_native_inherit_name(f.klass) << "." << string << "_ptr.Value.Delegate("
210 << self 210 << self
211 << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "") 211 << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "")
212 << (argument_invocation % ", ") << ");\n" 212 << (argument_invocation % ", ") << ");\n"
213 << eolian_mono::function_definition_epilogue() 213 << scope_tab(2) << eolian_mono::function_definition_epilogue()
214 << " }\n") 214 << scope_tab(1) << "}\n\n")
215 .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.parameters, f, f.c_name, f.parameters, f), context)) 215 .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.parameters, f, f.c_name, f.parameters, f), context))
216 return false; 216 return false;
217 217
@@ -268,11 +268,11 @@ struct property_extension_method_definition_generator
268 if (property.setter.is_engaged()) 268 if (property.setter.is_engaged())
269 { 269 {
270 attributes::type_def prop_type = property.setter->parameters[0].type; 270 attributes::type_def prop_type = property.setter->parameters[0].type;
271 if (!as_generator("public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<" 271 if (!as_generator(scope_tab << "public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<"
272 << name_helpers::klass_full_concrete_or_interface_name(cls) 272 << name_helpers::klass_full_concrete_or_interface_name(cls)
273 << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n" 273 << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n"
274 << scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(\"" << property.name << "\", fac);\n" 274 << scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(\"" << property.name << "\", fac);\n"
275 << scope_tab << "}\n" 275 << scope_tab << "}\n\n"
276 ).generate(sink, std::make_tuple(prop_type, prop_type), context)) 276 ).generate(sink, std::make_tuple(prop_type, prop_type), context))
277 return false; 277 return false;
278 } 278 }
@@ -285,11 +285,11 @@ struct property_extension_method_definition_generator
285 if (property.setter.is_engaged()) 285 if (property.setter.is_engaged())
286 { 286 {
287 attributes::type_def prop_type = property.setter->parameters[0].type; 287 attributes::type_def prop_type = property.setter->parameters[0].type;
288 if (!as_generator("public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "<T>(this Efl.BindablePart<T> part, Efl.Csharp.ExtensionTag<" 288 if (!as_generator(scope_tab << "public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "<T>(this Efl.BindablePart<T> part, Efl.Csharp.ExtensionTag<"
289 << name_helpers::klass_full_concrete_or_interface_name(cls) 289 << name_helpers::klass_full_concrete_or_interface_name(cls)
290 << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n" 290 << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n"
291 << scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(part.PartName, \"" << property.name << "\", part.Binder);\n" 291 << scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(part.PartName, \"" << property.name << "\", part.Binder);\n"
292 << scope_tab << "}\n" 292 << scope_tab << "}\n\n"
293 ).generate(sink, std::make_tuple(prop_type, prop_type), context)) 293 ).generate(sink, std::make_tuple(prop_type, prop_type), context))
294 return false; 294 return false;
295 } 295 }
@@ -522,7 +522,7 @@ struct property_wrapper_definition_generator
522 return false; 522 return false;
523 } 523 }
524 524
525 if (!as_generator(scope_tab << "}\n").generate(sink, attributes::unused, context)) 525 if (!as_generator(scope_tab << "}\n\n").generate(sink, attributes::unused, context))
526 return false; 526 return false;
527 527
528 return true; 528 return true;
diff --git a/src/bin/eolian_mono/eolian/mono/function_helpers.hh b/src/bin/eolian_mono/eolian/mono/function_helpers.hh
index 5f7cf67..26146f7 100644
--- a/src/bin/eolian_mono/eolian/mono/function_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_helpers.hh
@@ -34,14 +34,14 @@ struct native_function_definition_preamble_generator
34 return false; 34 return false;
35 35
36 if (!as_generator( 36 if (!as_generator(
37 *(scope_tab << scope_tab << native_convert_in_variable) 37 *(native_convert_in_variable)
38 << *(scope_tab << scope_tab << native_convert_out_variable) 38 << *(native_convert_out_variable)
39 << *(scope_tab << scope_tab << native_convert_function_pointer) 39 << *(native_convert_function_pointer)
40 << scope_tab << scope_tab << scope_tab << native_convert_return_variable 40 << native_convert_return_variable
41 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context)) 41 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context))
42 return false; 42 return false;
43 43
44 return as_generator("\n").generate(sink, attributes::unused, context); 44 return as_generator("").generate(sink, attributes::unused, context);
45 } 45 }
46}; 46};
47 47
@@ -57,11 +57,11 @@ struct function_definition_preamble_generator
57 return false; 57 return false;
58 58
59 if (!as_generator( 59 if (!as_generator(
60 *(scope_tab << scope_tab << convert_in_variable) 60 *(convert_in_variable)
61 << *(scope_tab << scope_tab << convert_out_variable) 61 << *(convert_out_variable)
62 << *(scope_tab << scope_tab << convert_function_pointer) 62 << *(convert_function_pointer)
63 << scope_tab << scope_tab << convert_return_variable 63 << convert_return_variable
64 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context)) 64 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context))
65 return false; 65 return false;
66 66
67 return true; 67 return true;
@@ -82,9 +82,9 @@ struct native_function_definition_epilogue_generator
82 return false; 82 return false;
83 83
84 if (!as_generator( 84 if (!as_generator(
85 *(scope_tab << scope_tab << native_convert_out_assign(*klass)) 85 *(native_convert_out_assign(*klass))
86 << *(scope_tab << scope_tab << native_convert_in_ptr_assign) 86 << *(native_convert_in_ptr_assign)
87 << scope_tab << scope_tab << native_convert_return(*klass) 87 << scope_tab(2) << native_convert_return(*klass)
88 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.return_type), context)) 88 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.return_type), context))
89 return false; 89 return false;
90 90
@@ -99,10 +99,10 @@ struct function_definition_epilogue_generator
99 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 99 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
100 { 100 {
101 if (!as_generator( 101 if (!as_generator(
102 scope_tab << scope_tab << "Eina.Error.RaiseIfUnhandledException();\n" 102 "Eina.Error.RaiseIfUnhandledException();\n"
103 << *(scope_tab << scope_tab << convert_out_assign) 103 << *(convert_out_assign)
104 << *(scope_tab << scope_tab << convert_in_ptr_assign) 104 << *(convert_in_ptr_assign)
105 << scope_tab << scope_tab << convert_return 105 << scope_tab(2) << convert_return << "\n"
106 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.return_type), context)) 106 ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.return_type), context))
107 return false; 107 return false;
108 108
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 80ac37c..f330264 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -127,10 +127,10 @@ struct klass
127 if(!as_generator("\n{\n").generate(sink, attributes::unused, iface_cxt)) 127 if(!as_generator("\n{\n").generate(sink, attributes::unused, iface_cxt))
128 return false; 128 return false;
129 129
130 if(!as_generator(*(scope_tab << function_declaration)).generate(sink, cls.functions, iface_cxt)) 130 if(!as_generator(*(function_declaration)).generate(sink, cls.functions, iface_cxt))
131 return false; 131 return false;
132 132
133 if(!as_generator(*(scope_tab << async_function_declaration)).generate(sink, cls.functions, iface_cxt)) 133 if(!as_generator(*(async_function_declaration)).generate(sink, cls.functions, iface_cxt))
134 return false; 134 return false;
135 135
136 if(!as_generator(*(event_declaration)).generate(sink, cls.events, iface_cxt)) 136 if(!as_generator(*(event_declaration)).generate(sink, cls.events, iface_cxt))
@@ -147,7 +147,7 @@ struct klass
147 return false; 147 return false;
148 148
149 // End of interface declaration 149 // End of interface declaration
150 if(!as_generator("}\n").generate(sink, attributes::unused, iface_cxt)) return false; 150 if(!as_generator("}\n\n").generate(sink, attributes::unused, iface_cxt)) return false;
151 } 151 }
152 152
153 // Events arguments go in the top namespace to avoid the Concrete suffix clutter in interface events. 153 // Events arguments go in the top namespace to avoid the Concrete suffix clutter in interface events.
@@ -213,7 +213,7 @@ struct klass
213 ( 213 (
214 scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(concrete_cxt).actual_library_name(cls.filename) 214 scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(concrete_cxt).actual_library_name(cls.filename)
215 << ")] internal static extern System.IntPtr\n" 215 << ")] internal static extern System.IntPtr\n"
216 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n" 216 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n\n"
217 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n" 217 << scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
218 << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n" 218 << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
219 << scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n" 219 << scope_tab << "/// <param name=\"wh\">The native pointer to be wrapped.</param>\n"
@@ -262,7 +262,7 @@ struct klass
262 scope_tab << "private static IntPtr GetEflClassStatic()\n" 262 scope_tab << "private static IntPtr GetEflClassStatic()\n"
263 << scope_tab << "{\n" 263 << scope_tab << "{\n"
264 << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" 264 << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
265 << scope_tab << "}\n" 265 << scope_tab << "}\n\n"
266 ).generate(sink, attributes::unused, concrete_cxt)) 266 ).generate(sink, attributes::unused, concrete_cxt))
267 return false; 267 return false;
268 268
@@ -342,7 +342,7 @@ struct klass
342 scope_tab << "private static IntPtr GetEflClassStatic()\n" 342 scope_tab << "private static IntPtr GetEflClassStatic()\n"
343 << scope_tab << "{\n" 343 << scope_tab << "{\n"
344 << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" 344 << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
345 << scope_tab << "}\n" 345 << scope_tab << "}\n\n"
346 ).generate(sink, attributes::unused, inherit_cxt)) 346 ).generate(sink, attributes::unused, inherit_cxt))
347 return false; 347 return false;
348 348
@@ -370,8 +370,8 @@ struct klass
370 << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx will hide these classes 370 << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx will hide these classes
371 <<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls) 371 <<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls)
372 << "_ExtensionMethods {\n" 372 << "_ExtensionMethods {\n"
373 << *((scope_tab << property_extension_method_definition(cls)) << "\n") 373 << *(property_extension_method_definition(cls))
374 << *((scope_tab << part_extension_method_definition(cls)) << "\n") 374 << *(part_extension_method_definition(cls))
375 << "}\n" 375 << "}\n"
376 << "#pragma warning restore CS1591\n" 376 << "#pragma warning restore CS1591\n"
377 << "#endif\n") 377 << "#endif\n")
@@ -416,7 +416,7 @@ struct klass
416 { 416 {
417 if(!as_generator( 417 if(!as_generator(
418 indent << scope_tab << "private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(" 418 indent << scope_tab << "private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule("
419 << indent << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n" 419 << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n\n"
420 ).generate(sink, attributes::unused, inative_cxt)) 420 ).generate(sink, attributes::unused, inative_cxt))
421 return false; 421 return false;
422 } 422 }
@@ -466,7 +466,7 @@ struct klass
466 466
467 if(!as_generator( 467 if(!as_generator(
468 indent << scope_tab << scope_tab << "return descs;\n" 468 indent << scope_tab << scope_tab << "return descs;\n"
469 << indent << scope_tab << "}\n" 469 << indent << scope_tab << "}\n\n"
470 ).generate(sink, attributes::unused, inative_cxt)) 470 ).generate(sink, attributes::unused, inative_cxt))
471 return false; 471 return false;
472 472
@@ -532,7 +532,7 @@ struct klass
532 if(!as_generator( 532 if(!as_generator(
533 scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(context).actual_library_name(cls.filename) 533 scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(context).actual_library_name(cls.filename)
534 << ")] internal static extern System.IntPtr\n" 534 << ")] internal static extern System.IntPtr\n"
535 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n" 535 << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n\n"
536 ).generate(sink, attributes::unused, context)) 536 ).generate(sink, attributes::unused, context))
537 return false; 537 return false;
538 538
@@ -607,7 +607,7 @@ struct klass
607 return true; 607 return true;
608 608
609 // Self events 609 // Self events
610 if (!as_generator(*(event_definition(cls, cls))).generate(sink, cls.events, context)) 610 if (!as_generator(*(event_definition(cls, cls)) << "\n").generate(sink, cls.events, context))
611 return false; 611 return false;
612 612
613 // Inherited events 613 // Inherited events
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index e68de6b..08b2bc9 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -508,7 +508,7 @@ bool open_namespaces(OutputIterator sink, std::vector<std::string> namespaces, C
508template<typename OutputIterator, typename Context> 508template<typename OutputIterator, typename Context>
509bool close_namespaces(OutputIterator sink, std::vector<std::string> const& namespaces, Context const& context) 509bool close_namespaces(OutputIterator sink, std::vector<std::string> const& namespaces, Context const& context)
510{ 510{
511 auto close_namespace = (lit("}") % "\n\n" ) << "\n\n"; 511 auto close_namespace = (lit("}") % "\n" ) << "\n\n";
512 return as_generator(close_namespace).generate(sink, namespaces, context); 512 return as_generator(close_namespace).generate(sink, namespaces, context);
513} 513}
514 514
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index 52afaf4..4050c60 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -1071,7 +1071,7 @@ struct convert_return_generator
1071 else if (helpers::need_struct_conversion(regular)) 1071 else if (helpers::need_struct_conversion(regular))
1072 { 1072 {
1073 return as_generator( 1073 return as_generator(
1074 "return _ret_var;\n" 1074 "return _ret_var;"
1075 ).generate(sink, nullptr, context); 1075 ).generate(sink, nullptr, context);
1076 } 1076 }
1077 else if (ret_type.c_type == "Eina_Binbuf *" || ret_type.c_type == "const Eina_Binbuf *") 1077 else if (ret_type.c_type == "Eina_Binbuf *" || ret_type.c_type == "const Eina_Binbuf *")
@@ -1119,7 +1119,7 @@ struct convert_return_generator
1119 } 1119 }
1120 else if (ret_type.c_type != "void") 1120 else if (ret_type.c_type != "void")
1121 { 1121 {
1122 return as_generator("return _ret_var;\n").generate(sink, ret_type, context); 1122 return as_generator("return _ret_var;").generate(sink, ret_type, context);
1123 } 1123 }
1124 return true; 1124 return true;
1125 } 1125 }
@@ -1289,13 +1289,13 @@ struct native_convert_return_generator
1289 if (ret_type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion_in_return(ret_type, attributes::parameter_direction::unknown) ) 1289 if (ret_type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion_in_return(ret_type, attributes::parameter_direction::unknown) )
1290 { 1290 {
1291 return as_generator( 1291 return as_generator(
1292 "return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var);\n" 1292 "return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var);"
1293 ).generate(sink, attributes::unused, context); 1293 ).generate(sink, attributes::unused, context);
1294 } 1294 }
1295 else if (helpers::need_struct_conversion(regular)) 1295 else if (helpers::need_struct_conversion(regular))
1296 { 1296 {
1297 return as_generator( 1297 return as_generator(
1298 "return _ret_var;\n" 1298 "return _ret_var;"
1299 ).generate(sink, nullptr, context); 1299 ).generate(sink, nullptr, context);
1300 } 1300 }
1301 else if (ret_type.c_type == "const char *") 1301 else if (ret_type.c_type == "const char *")
@@ -1308,12 +1308,12 @@ struct native_convert_return_generator
1308 return false; 1308 return false;
1309 } 1309 }
1310 return as_generator( 1310 return as_generator(
1311 "return _ret_var;\n" 1311 "return _ret_var;"
1312 ).generate(sink, attributes::unused, context); 1312 ).generate(sink, attributes::unused, context);
1313 } 1313 }
1314 else 1314 else
1315 { 1315 {
1316 return as_generator("return _ret_var;\n" 1316 return as_generator("return _ret_var;"
1317 ).generate(sink, attributes::unused, context); 1317 ).generate(sink, attributes::unused, context);
1318 } 1318 }
1319 } 1319 }
@@ -1326,12 +1326,12 @@ struct native_convert_return_generator
1326 return false; 1326 return false;
1327 } 1327 }
1328 return as_generator( 1328 return as_generator(
1329 "return _ret_var;\n" 1329 "return _ret_var;"
1330 ).generate(sink, attributes::unused, context); 1330 ).generate(sink, attributes::unused, context);
1331 } 1331 }
1332 else 1332 else
1333 { 1333 {
1334 return as_generator("return _ret_var;\n") 1334 return as_generator("return _ret_var;")
1335 .generate(sink, attributes::unused, context); 1335 .generate(sink, attributes::unused, context);
1336 } 1336 }
1337 } 1337 }
@@ -1341,7 +1341,7 @@ struct native_convert_return_generator
1341 .generate(sink, attributes::unused, context)) 1341 .generate(sink, attributes::unused, context))
1342 return false; 1342 return false;
1343 1343
1344 return as_generator("return _ret_var.Handle;\n") 1344 return as_generator("return _ret_var.Handle;")
1345 .generate(sink, attributes::unused, context); 1345 .generate(sink, attributes::unused, context);
1346 } 1346 }
1347 else if (ret_type.c_type == "Eina_Hash *" || ret_type.c_type == "const Eina_Hash *") 1347 else if (ret_type.c_type == "Eina_Hash *" || ret_type.c_type == "const Eina_Hash *")
@@ -1359,7 +1359,7 @@ struct native_convert_return_generator
1359 .generate(sink, attributes::unused, context)) 1359 .generate(sink, attributes::unused, context))
1360 return false; 1360 return false;
1361 1361
1362 return as_generator("return _ret_var.Handle;\n") 1362 return as_generator("return _ret_var.Handle;")
1363 .generate(sink, attributes::unused, context); 1363 .generate(sink, attributes::unused, context);
1364 } 1364 }
1365 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *" 1365 else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *"
@@ -1386,11 +1386,11 @@ struct native_convert_return_generator
1386 return false; 1386 return false;
1387 } 1387 }
1388 1388
1389 return as_generator("return _ret_var.Handle;\n") 1389 return as_generator("return _ret_var.Handle;")
1390 .generate(sink, attributes::unused, context); 1390 .generate(sink, attributes::unused, context);
1391 } 1391 }
1392 else if (ret_type.c_type != "void") 1392 else if (ret_type.c_type != "void")
1393 return as_generator("return _ret_var;\n").generate(sink, ret_type, context); 1393 return as_generator("return _ret_var;").generate(sink, ret_type, context);
1394 return true; 1394 return true;
1395 } 1395 }
1396 1396
diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh
index 3569f43..f3811b9 100644
--- a/src/bin/eolian_mono/eolian/mono/part_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh
@@ -60,7 +60,7 @@ struct part_extension_method_definition_generator
60 << ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n" 60 << ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n"
61 << scope_tab << "{\n" 61 << scope_tab << "{\n"
62 << scope_tab << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\" ,fac);\n" 62 << scope_tab << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\" ,fac);\n"
63 << scope_tab << "}\n" 63 << scope_tab << "}\n\n"
64 ).generate(sink, attributes::unused, context)) 64 ).generate(sink, attributes::unused, context))
65 return false; 65 return false;
66 66
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index fe96e2d..7fb4c0c 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -370,12 +370,12 @@ struct struct_internal_definition_generator
370 } 370 }
371 371
372 if (!as_generator(indent << scope_tab << scope_tab << "return _external_struct;\n" 372 if (!as_generator(indent << scope_tab << scope_tab << "return _external_struct;\n"
373 << indent << scope_tab << "}\n\n").generate(sink, nullptr, context)) 373 << indent << scope_tab << "}\n").generate(sink, nullptr, context))
374 return false; 374 return false;
375 375
376 // close internal class 376 // close internal class
377 if(!as_generator(indent << "}\n\n" 377 if(!as_generator(indent << "}\n"
378 << indent << "#pragma warning restore CS1591\n\n" 378 << indent << "#pragma warning restore CS1591\n"
379 ).generate(sink, attributes::unused, context)) return false; 379 ).generate(sink, attributes::unused, context)) return false;
380 380
381 return true; 381 return true;
diff --git a/src/bin/eolian_mono/eolian/mono/struct_fields.hh b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
index 02b2cbe..9a0225e 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_fields.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
@@ -42,7 +42,7 @@ struct field_argument_docs_generator
42 template<typename OutputIterator, typename Context> 42 template<typename OutputIterator, typename Context>
43 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const 43 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
44 { 44 {
45 if (!as_generator("/// <param name=\"" << string << "\">" << documentation_string << "</param>") 45 if (!as_generator(current_indentation(context) << "/// <param name=\"" << string << "\">" << documentation_string << "</param>")
46 .generate(sink, std::make_tuple(name_helpers::to_field_name(field.name), field.documentation.summary), context)) 46 .generate(sink, std::make_tuple(name_helpers::to_field_name(field.name), field.documentation.summary), context))
47 return false; 47 return false;
48 return true; 48 return true;