2010-03-31 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 1 Apr 2010 00:15:55 +0000 (00:15 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 1 Apr 2010 00:15:55 +0000 (00:15 -0000)
* Module.cs:
* MonoModule.cs: Implement GetSignerCertificate and
GetTypes.

svn path=/trunk/mcs/; revision=154594

mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/Module.cs
mcs/class/corlib/System.Reflection/MonoModule.cs

index 577758bc3dbb573484d042df8a9fb5c4614254a7..6fc3f799623f0518b8ecfeddf4093e78257b0668 100644 (file)
@@ -1,3 +1,9 @@
+2010-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * Module.cs:
+       * MonoModule.cs: Implement GetSignerCertificate and
+       GetTypes.
+
 2010-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * Module.cs:
index 38c40ceb5bc27ad657baaa171ce8bc3c23f6c155..0830cec58f2d922627f0051cd2601cf3e60242d4 100644 (file)
@@ -170,18 +170,6 @@ namespace System.Reflection {
                        UnitySerializationHolder.GetModuleData (this, info, context);
                }
 
-#if !NET_2_1
-               public X509Certificate GetSignerCertificate ()
-               {
-                       try {
-                               return X509Certificate.CreateFromSignedFile (assembly.Location);
-                       }
-                       catch {
-                               return null;
-                       }
-               }
-#endif
-
                [ComVisible (true)]
                public virtual Type GetType(string className) 
                {
@@ -195,12 +183,7 @@ namespace System.Reflection {
                }
        
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               private extern Type[] InternalGetTypes ();
-       
-               public virtual Type[] GetTypes() 
-               {
-                       return InternalGetTypes ();
-               }
+               internal extern Type[] InternalGetTypes ();
        
                public override string ToString () 
                {
@@ -441,6 +424,16 @@ namespace System.Reflection {
                {
                        throw CreateNIE ();
                }
+
+               public virtual X509Certificate GetSignerCertificate ()
+               {
+                       throw CreateNIE ();
+               }
+
+               public virtual Type[] GetTypes() 
+               {
+                       throw CreateNIE ();
+               }
 #endif
 
        }
index e9e709863a9dd33ccd3cb57e734acc03117ef485..939989acd4f3948de72116e6523bf2f4bd82393e 100644 (file)
@@ -31,6 +31,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Runtime.InteropServices;
+using System.Security.Cryptography.X509Certificates;
 
 
 namespace System.Reflection {
@@ -262,6 +263,33 @@ namespace System.Reflection {
                                return res;
                }
 
+#if !NET_2_1
+
+               public
+#if NET_4_0
+               override
+#endif
+               X509Certificate GetSignerCertificate ()
+               {
+                       try {
+                               return X509Certificate.CreateFromSignedFile (assembly.Location);
+                       }
+                       catch {
+                               return null;
+                       }
+               }
+#endif
+
+#if NET_4_0
+               public override
+#else
+               public virtual
+#endif
+               Type[] GetTypes() 
+               {
+                       return InternalGetTypes ();
+               }
+
 #if NET_4_0
                public override IList<CustomAttributeData> GetCustomAttributesData () {
                        return CustomAttributeData.GetCustomAttributes (this);