Pārlūkot izejas kodu

2010-03-31 Rodrigo Kumpera <[email protected]>

	* Module.cs:
	* MonoModule.cs: Implement GetCustomAttributesData.

svn path=/trunk/mcs/; revision=154591
Rodrigo Kumpera 15 gadi atpakaļ
vecāks
revīzija
fb3890982c

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

@@ -1,3 +1,8 @@
+2010-03-31 Rodrigo Kumpera  <[email protected]>
+
+	* Module.cs:
+	* MonoModule.cs: Implement GetCustomAttributesData.
+
 2010-03-31 Rodrigo Kumpera  <[email protected]>
 
 	* Module.cs:

+ 4 - 6
mcs/class/corlib/System.Reflection/Module.cs

@@ -388,12 +388,6 @@ namespace System.Reflection {
 				return res;
 		}
 
-#if NET_4_0
-		public virtual IList<CustomAttributeData> GetCustomAttributesData () {
-			return CustomAttributeData.GetCustomAttributes (this);
-		}
-#endif
-
 		internal static Type MonoDebugger_ResolveType (Module module, int token)
 		{
 			ResolveTokenError error;
@@ -508,6 +502,10 @@ namespace System.Reflection {
 		{
 			throw CreateNIE ();
 		}
+
+		public virtual IList<CustomAttributeData> GetCustomAttributesData () {
+			throw CreateNIE ();
+		}
 #endif
 
 	}

+ 7 - 0
mcs/class/corlib/System.Reflection/MonoModule.cs

@@ -28,6 +28,7 @@
 
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Globalization;
 using System.Runtime.InteropServices;
 
@@ -87,5 +88,11 @@ namespace System.Reflection {
 		{
 			return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
 		}
+
+#if NET_4_0
+		public override IList<CustomAttributeData> GetCustomAttributesData () {
+			return CustomAttributeData.GetCustomAttributes (this);
+		}
+#endif
 	}
 }