diff --git a/crypto/src/asn1/DerGeneralizedTime.cs b/crypto/src/asn1/DerGeneralizedTime.cs
index 548a268e1..6700b9016 100644
--- a/crypto/src/asn1/DerGeneralizedTime.cs
+++ b/crypto/src/asn1/DerGeneralizedTime.cs
@@ -159,7 +159,7 @@ namespace Org.BouncyCastle.Asn1
char sign = '+';
DateTime time = ToDateTime();
-#if SILVERLIGHT
+#if SILVERLIGHT || PORTABLE
long offset = time.Ticks - time.ToUniversalTime().Ticks;
if (offset < 0)
{
diff --git a/crypto/src/asn1/cms/AttributeTable.cs b/crypto/src/asn1/cms/AttributeTable.cs
index 8a3ee5d0e..8d357f1a6 100644
--- a/crypto/src/asn1/cms/AttributeTable.cs
+++ b/crypto/src/asn1/cms/AttributeTable.cs
@@ -10,7 +10,7 @@ namespace Org.BouncyCastle.Asn1.Cms
{
private readonly IDictionary attributes;
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete]
public AttributeTable(
Hashtable attrs)
@@ -168,7 +168,7 @@ namespace Org.BouncyCastle.Asn1.Cms
return Platform.CreateHashtable(attributes);
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete("Use 'ToDictionary' instead")]
public Hashtable ToHashtable()
{
diff --git a/crypto/src/asn1/smime/SMIMECapabilities.cs b/crypto/src/asn1/smime/SMIMECapabilities.cs
index 5fb67dde1..6435caf68 100644
--- a/crypto/src/asn1/smime/SMIMECapabilities.cs
+++ b/crypto/src/asn1/smime/SMIMECapabilities.cs
@@ -71,7 +71,7 @@ namespace Org.BouncyCastle.Asn1.Smime
capabilities = seq;
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete("Use 'GetCapabilitiesForOid' instead")]
public ArrayList GetCapabilities(
DerObjectIdentifier capability)
diff --git a/crypto/src/asn1/util/Dump.cs b/crypto/src/asn1/util/Dump.cs
index 27c87f127..99ced5836 100644
--- a/crypto/src/asn1/util/Dump.cs
+++ b/crypto/src/asn1/util/Dump.cs
@@ -1,5 +1,4 @@
-using Org.BouncyCastle.Asn1;
-
+#if !PORTABLE
using System;
using System.IO;
@@ -26,3 +25,4 @@ namespace Org.BouncyCastle.Asn1.Utilities
}
}
}
+#endif
diff --git a/crypto/src/asn1/x509/AttributeTable.cs b/crypto/src/asn1/x509/AttributeTable.cs
index ffe0ea935..33faad64a 100644
--- a/crypto/src/asn1/x509/AttributeTable.cs
+++ b/crypto/src/asn1/x509/AttributeTable.cs
@@ -16,7 +16,7 @@ namespace Org.BouncyCastle.Asn1.X509
this.attributes = Platform.CreateHashtable(attrs);
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete]
public AttributeTable(
Hashtable attrs)
@@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Asn1.X509
return (AttributeX509) attributes[oid];
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete("Use 'ToDictionary' instead")]
public Hashtable ToHashtable()
{
diff --git a/crypto/src/asn1/x509/ExtendedKeyUsage.cs b/crypto/src/asn1/x509/ExtendedKeyUsage.cs
index a5b11f210..9b1400db9 100644
--- a/crypto/src/asn1/x509/ExtendedKeyUsage.cs
+++ b/crypto/src/asn1/x509/ExtendedKeyUsage.cs
@@ -70,7 +70,7 @@ namespace Org.BouncyCastle.Asn1.X509
}
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete]
public ExtendedKeyUsage(
ArrayList usages)
@@ -101,7 +101,7 @@ namespace Org.BouncyCastle.Asn1.X509
return usageTable.Contains(keyPurposeId);
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete("Use 'GetAllUsages'")]
public ArrayList GetUsages()
{
diff --git a/crypto/src/asn1/x509/NameConstraints.cs b/crypto/src/asn1/x509/NameConstraints.cs
index 8374ff60a..c178f5b45 100644
--- a/crypto/src/asn1/x509/NameConstraints.cs
+++ b/crypto/src/asn1/x509/NameConstraints.cs
@@ -41,7 +41,7 @@ namespace Org.BouncyCastle.Asn1.X509
}
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
public NameConstraints(
ArrayList permitted,
ArrayList excluded)
diff --git a/crypto/src/asn1/x509/PolicyMappings.cs b/crypto/src/asn1/x509/PolicyMappings.cs
index 3ad351107..928ad134d 100644
--- a/crypto/src/asn1/x509/PolicyMappings.cs
+++ b/crypto/src/asn1/x509/PolicyMappings.cs
@@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Asn1.X509
this.seq = seq;
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
public PolicyMappings(
Hashtable mappings)
: this((IDictionary)mappings)
diff --git a/crypto/src/asn1/x509/SubjectDirectoryAttributes.cs b/crypto/src/asn1/x509/SubjectDirectoryAttributes.cs
index fcb30290d..c76d94d78 100644
--- a/crypto/src/asn1/x509/SubjectDirectoryAttributes.cs
+++ b/crypto/src/asn1/x509/SubjectDirectoryAttributes.cs
@@ -78,7 +78,7 @@ namespace Org.BouncyCastle.Asn1.X509
}
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
[Obsolete]
public SubjectDirectoryAttributes(
ArrayList attributes)
diff --git a/crypto/src/asn1/x509/X509Extensions.cs b/crypto/src/asn1/x509/X509Extensions.cs
index 5dce5622d..1896450f5 100644
--- a/crypto/src/asn1/x509/X509Extensions.cs
+++ b/crypto/src/asn1/x509/X509Extensions.cs
@@ -278,7 +278,7 @@ namespace Org.BouncyCastle.Asn1.X509
}
}
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || PORTABLE)
/**
* constructor from a table of extensions.
* <p>
diff --git a/crypto/src/asn1/x509/X509Name.cs b/crypto/src/asn1/x509/X509Name.cs
index c183e5798..fb404a3ec 100644
--- a/crypto/src/asn1/x509/X509Name.cs
+++ b/crypto/src/asn1/x509/X509Name.cs
@@ -3,7 +3,7 @@ using System.Collections;
using System.IO;
using System.Text;
-#if SILVERLIGHT
+#if SILVERLIGHT || PORTABLE
using System.Collections.Generic;
#endif
@@ -203,7 +203,7 @@ namespace Org.BouncyCastle.Asn1.X509
private static readonly bool[] defaultReverse = { false };
-#if SILVERLIGHT
+#if SILVERLIGHT || PORTABLE
/**
* default look up table translating OID values into their common symbols following
* the convention in RFC 2253 with a few extras
@@ -1027,7 +1027,7 @@ namespace Org.BouncyCastle.Asn1.X509
bool reverse,
IDictionary oidSymbols)
{
-#if SILVERLIGHT
+#if SILVERLIGHT || PORTABLE
List<object> components = new List<object>();
#else
ArrayList components = new ArrayList();
|