[sdb] Add an ExitCode property to VMDeathEvent. Fixes #16113.
[mono.git] / mcs / class / corlib / System.Security.Policy / Publisher.cs
index 21a774ffbdce73e66dc44e8415ea24b5dc6c6d7b..d473e98d59afb13edfc8ab5761fd4d3c98d1b5aa 100644 (file)
@@ -34,10 +34,12 @@ using System.Runtime.InteropServices;
 namespace System.Security.Policy {
 
        [Serializable]
-#if NET_2_0
        [ComVisible (true)]
+       public sealed class Publisher :
+#if NET_4_0
+               EvidenceBase,
 #endif
-       public sealed class Publisher : IIdentityPermissionFactory, IBuiltInEvidence {
+               IIdentityPermissionFactory, IBuiltInEvidence {
        
                private X509Certificate m_cert;
 
@@ -45,21 +47,15 @@ namespace System.Security.Policy {
                {
                        if (cert == null)
                                throw new ArgumentNullException ("cert");
-#if NET_2_0
                        if (cert.GetHashCode () == 0)
                                throw new ArgumentException ("cert");
-#endif
                        m_cert = cert;
                }
 
                public X509Certificate Certificate { 
                        get {
                                if (m_cert.GetHashCode () == 0) {
-#if NET_2_0
                                        throw new ArgumentException ("m_cert");
-#else
-                                       throw new NullReferenceException ("m_cert");
-#endif 
                                }
                                return m_cert; 
                        }
@@ -79,7 +75,7 @@ namespace System.Security.Policy {
                {
                        Publisher p = (o as Publisher);
                        if (p == null)
-                               throw new ArgumentException ("not a Publisher");
+                               throw new ArgumentException ("o", Locale.GetText ("not a Publisher instance."));
                        return m_cert.Equals (p.Certificate);
                }
        
@@ -102,19 +98,18 @@ namespace System.Security.Policy {
 
                // interface IBuiltInEvidence
 
-               [MonoTODO]
                int IBuiltInEvidence.GetRequiredSize (bool verbose) 
                {
                        return (verbose ? 3 : 1) + m_cert.GetRawCertData ().Length;
                }
 
-               [MonoTODO]
+               [MonoTODO ("IBuiltInEvidence")]
                int IBuiltInEvidence.InitFromBuffer (char [] buffer, int position) 
                {
                        return 0;
                }
 
-               [MonoTODO]
+               [MonoTODO ("IBuiltInEvidence")]
                int IBuiltInEvidence.OutputToBuffer (char [] buffer, int position, bool verbose) 
                {
                        return 0;