diff options
Diffstat (limited to 'crypto/src/bcpg/ArmoredOutputStream.cs')
-rw-r--r-- | crypto/src/bcpg/ArmoredOutputStream.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/src/bcpg/ArmoredOutputStream.cs b/crypto/src/bcpg/ArmoredOutputStream.cs index 5d4b6b5a7..fb1f6eb29 100644 --- a/crypto/src/bcpg/ArmoredOutputStream.cs +++ b/crypto/src/bcpg/ArmoredOutputStream.cs @@ -5,6 +5,10 @@ using System.IO; using System.Reflection; using System.Text; +#if PORTABLE +using System.Linq; +#endif + using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.IO; @@ -98,7 +102,15 @@ namespace Org.BouncyCastle.Bcpg private static readonly string footerTail = "-----"; private static readonly string version = "BCPG C# v" +#if PORTABLE + + Assembly.GetExecutingAssembly() + .GetCustomAttributes(typeof(AssemblyVersionAttribute), true) + .Cast<AssemblyVersionAttribute>() + .First() + .Version; +#else + Assembly.GetExecutingAssembly().GetName().Version; +#endif private readonly IDictionary headers; |