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;
{
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;
}
{
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);
}
// 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;