public MethodInfo remove_method;
public MethodInfo raise_method;
public EventAttributes attrs;
+ public MethodInfo[] other_methods;
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern void get_event_info (MonoEvent ev, out MonoEventInfo info);
public override MethodInfo GetAddMethod(bool nonPublic) {
MonoEventInfo info;
MonoEventInfo.get_event_info (this, out info);
-
- return info.add_method;
+
+
+ if (nonPublic || (info.add_method != null && info.add_method.IsPublic))
+ return info.add_method;
+ return null;
}
public override MethodInfo GetRaiseMethod( bool nonPublic) {
MonoEventInfo info;
MonoEventInfo.get_event_info (this, out info);
- return info.raise_method;
+ if (nonPublic || (info.raise_method != null && info.raise_method.IsPublic))
+ return info.raise_method;
+ return null;
}
public override MethodInfo GetRemoveMethod( bool nonPublic) {
MonoEventInfo info;
MonoEventInfo.get_event_info (this, out info);
-
- return info.remove_method;
+
+ if (nonPublic || (info.remove_method != null && info.remove_method.IsPublic))
+ return info.remove_method;
+ return null;
+ }
+
+#if NET_2_0
+ public override MethodInfo[] GetOtherMethods (bool nonPublic) {
+ MonoEventInfo info;
+ MonoEventInfo.get_event_info (this, out info);
+
+ return info.other_methods;
}
+#endif
public override Type DeclaringType {
get {
}
}
- public override string ToString () {
+ public override string ToString ()
+ {
return EventHandlerType + " " + Name;
}
+ public override bool IsDefined (Type attributeType, bool inherit)
+ {
+ return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
+ }
+
+ public override object[] GetCustomAttributes( bool inherit)
+ {
+ return MonoCustomAttrs.GetCustomAttributes (this, inherit);
+ }
+
+ public override object[] GetCustomAttributes( Type attributeType, bool inherit)
+ {
+ return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
+ }
+
}
}