summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-10-24 18:50:48 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-24 19:25:35 -0300
commit1adb7658790a705e19d3d4350800eb6269a7a612 (patch)
tree5034e433f0d649a8560cbdd0d9e24a5dda74236b /src/bindings/mono/eo_mono
parent6231d5f2528ecc71a3f45636ea33eefb1e34678e (diff)
csharp: Returning only method name iwrapper.
Summary: GetUserMethods returning only strings, not the whole method informations. Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10503
Diffstat (limited to 'src/bindings/mono/eo_mono')
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index 5154c4b..d9ae4e5 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -22,6 +22,7 @@ using System.Collections.Generic;
22using System.Diagnostics; 22using System.Diagnostics;
23using System.Reflection; 23using System.Reflection;
24using System.Threading; 24using System.Threading;
25using System.Linq;
25 26
26using static Eina.NativeCustomExportFunctions; 27using static Eina.NativeCustomExportFunctions;
27using EoG = Efl.Eo.Globals; 28using EoG = Efl.Eo.Globals;
@@ -368,26 +369,31 @@ public static class Globals
368 return null; 369 return null;
369 } 370 }
370 371
371 public static System.Collections.Generic.List<System.Reflection.MethodInfo> 372 public static System.Collections.Generic.List<string>
372 GetUserMethods(System.Type type) 373 GetUserMethods(System.Type type)
373 { 374 {
374 var r = new System.Collections.Generic.List<System.Reflection.MethodInfo>(); 375 var r = new System.Collections.Generic.List<string>();
375 var flags = System.Reflection.BindingFlags.Instance 376 var flags =
376 | System.Reflection.BindingFlags.DeclaredOnly 377 System.Reflection.BindingFlags.Instance
377 | System.Reflection.BindingFlags.Public 378 | System.Reflection.BindingFlags.DeclaredOnly
378 | System.Reflection.BindingFlags.NonPublic; 379 | System.Reflection.BindingFlags.Public
379 r.AddRange(type.GetMethods(flags)); 380 | System.Reflection.BindingFlags.NonPublic;
380 var base_type = type.BaseType;
381 381
382 for (;base_type != null; base_type = base_type.BaseType) 382 for (var base_type = type;;base_type = base_type.BaseType)
383 { 383 {
384 if (IsGeneratedClass(base_type)) 384 r.AddRange(base_type.GetMethods(flags)
385 .AsParallel().Select(info=>info.Name).ToList());
386 if (IsGeneratedClass(base_type.BaseType))
385 { 387 {
386 return r; 388 break;
387 } 389 }
388 390
389 r.AddRange(base_type.GetMethods(flags)); 391 if (base_type.BaseType == null)
392 {
393 break;
394 }
390 } 395 }
396
391 return r; 397 return r;
392 } 398 }
393 399