public override EventInfo[] GetEvents(BindingFlags bf) { ArrayList l = new ArrayList(); Type current_type = this; do { MonoGenericClass gi = current_type as MonoGenericClass; if (gi != null) { l.AddRange(gi.GetEvents_impl(bf, this)); } else if (current_type is TypeBuilder) { l.AddRange(current_type.GetEvents(bf)); } else { MonoType mt = (MonoType)current_type; l.AddRange(mt.GetEvents(bf)); break; } if ((bf & BindingFlags.DeclaredOnly) != 0) { break; } current_type = current_type.BaseType; } while (current_type != null); EventInfo[] result = new EventInfo [l.Count]; l.CopyTo(result); return(result); }