Bladeren bron

2004-09-23 Zoltan Varga <[email protected]>

	* MonoEvent.cs (MonoEventInfo): Add 'other_methods' field.

	* EventInfo.cs MonoEvent.cs: Add NET 2.0 GetOtherMethods method.

svn path=/trunk/mcs/; revision=34274
Zoltan Varga 21 jaren geleden
bovenliggende
commit
ff31bb0f42

+ 6 - 0
mcs/class/corlib/System.Reflection/ChangeLog

@@ -1,3 +1,9 @@
+2004-09-23  Zoltan Varga  <[email protected]>
+
+	* MonoEvent.cs (MonoEventInfo): Add 'other_methods' field.
+
+	* EventInfo.cs MonoEvent.cs: Add NET 2.0 GetOtherMethods method.
+
 2004-09-22  Zoltan Varga  <[email protected]>
 
 	* Module.cs: Implement net 2.0 ResolveXXX methods.

+ 11 - 0
mcs/class/corlib/System.Reflection/EventInfo.cs

@@ -90,6 +90,17 @@ namespace System.Reflection {
 		}
 		public abstract MethodInfo GetRemoveMethod( bool nonPublic);
 
+#if NET_2_0
+		public virtual MethodInfo[] GetOtherMethods (bool nonPublic) {
+			// Shouldn't this be abstract, like the other methods ?
+			throw new NotImplementException ();
+		}
+
+		public MethodInfo[] GetOtherMethods () {
+			return GetOtherMethods (false);
+		}
+#endif		
+
 		[DebuggerHidden]
 		[DebuggerStepThrough]
 		public void RemoveEventHandler (object target, Delegate handler)

+ 10 - 0
mcs/class/corlib/System.Reflection/MonoEvent.cs

@@ -45,6 +45,7 @@ namespace System.Reflection {
 		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);
@@ -84,6 +85,15 @@ namespace System.Reflection {
 			return info.remove_method;
 		}
 
+#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 {
 				MonoEventInfo info;