xartigas pushed a commit to branch master.

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

commit f01b1134012bafcc4d0c82588230796a7c9ef5bb
Author: Xavi Artigas <[email protected]>
Date:   Fri Aug 2 13:49:20 2019 +0200

    mono-docs: Add event args link for event handlers
    
    For some reason DocFX does not generate links for templated event handlers:
    event EventHandler<Efl.Input.IInterfacePointerOutEvt_Args> PointerOutEvt;
    
    After unsuccessfully trying to find out why, this patch adds the link to the
    event arguments in a <value> tag, so at least it shows in the documentation
    and the reader has somewhere to click to find out what arguments an event
    is sending.
---
 src/bin/eolian_mono/eolian/mono/events.hh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/events.hh 
b/src/bin/eolian_mono/eolian/mono/events.hh
index fc623d02e3..777d22591c 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -279,9 +279,15 @@ struct event_declaration_generator
         wrapper_args_type = "<" + name_helpers::managed_event_args_name(evt) + 
">";
 
       if (!as_generator(
-                documentation(1)
-                << scope_tab << "event EventHandler" << wrapper_args_type << " 
" << evt_name << ";\n"
-             ).generate(sink, evt, context))
+              documentation(1)
+           ).generate(sink, evt, context)) return false;
+      if (evt.type.is_engaged())
+        if (!as_generator(
+                scope_tab << scope_tab << "/// <value><see cref=\"" << 
name_helpers::managed_event_args_name(evt) << "\"/></value>\n"
+             ).generate(sink, evt, context)) return false;
+      if (!as_generator(
+              scope_tab << "event EventHandler" << wrapper_args_type << " " << 
evt_name << ";\n"
+           ).generate(sink, evt, context))
         return false;
 
       return true;

-- 


Reply via email to