X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Reflection%2FMonoEvent.cs;h=9ddc79b4adb15efced067ae442851e3bce6b6905;hb=6b2b23c753525c5c5c2b391e9adc36c650825e1f;hp=95b25b008132954e4f7e16119014faa8fbc36860;hpb=07ec1253c277856bdbb74213e2defc8ed23cf8e3;p=mono.git diff --git a/mcs/class/corlib/System.Reflection/MonoEvent.cs b/mcs/class/corlib/System.Reflection/MonoEvent.cs index 95b25b00813..9ddc79b4adb 100644 --- a/mcs/class/corlib/System.Reflection/MonoEvent.cs +++ b/mcs/class/corlib/System.Reflection/MonoEvent.cs @@ -97,7 +97,22 @@ namespace System.Reflection { MonoEventInfo info; MonoEventInfo.get_event_info (this, out info); - return info.other_methods; + if (nonPublic) + return info.other_methods; + int num_public = 0; + foreach (MethodInfo m in info.other_methods) { + if (m.IsPublic) + num_public++; + } + if (num_public == info.other_methods.Length) + return info.other_methods; + MethodInfo[] res = new MethodInfo [num_public]; + num_public = 0; + foreach (MethodInfo m in info.other_methods) { + if (m.IsPublic) + res [num_public++] = m; + } + return res; } #endif