diff options
author | Oren Novotny <oren@novotny.org> | 2015-10-18 16:48:29 -0400 |
---|---|---|
committer | Oren Novotny <oren@novotny.org> | 2015-10-18 16:48:29 -0400 |
commit | 31fa421f62572bb254b42b3b0036429a59bba03f (patch) | |
tree | c636e377f23c8227e0af96c0d24bf24b82686da8 | |
parent | Merge in latest from master (diff) | |
download | BouncyCastle.NET-ed25519-31fa421f62572bb254b42b3b0036429a59bba03f.tar.xz |
handle version info cleanly
-rw-r--r-- | crypto/src/bcpg/ArmoredOutputStream.cs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/crypto/src/bcpg/ArmoredOutputStream.cs b/crypto/src/bcpg/ArmoredOutputStream.cs index 6b3f48354..44b2b78e7 100644 --- a/crypto/src/bcpg/ArmoredOutputStream.cs +++ b/crypto/src/bcpg/ArmoredOutputStream.cs @@ -101,19 +101,7 @@ namespace Org.BouncyCastle.Bcpg private static readonly string footerStart = "-----END PGP "; private static readonly string footerTail = "-----"; - private static readonly string version = "BCPG C# v" -#if DOTNET - + typeof(ArmoredOutputStream).GetTypeInfo().Assembly - .GetCustomAttribute<AssemblyVersionAttribute>().Version; -#elif PORTABLE - + Assembly.GetExecutingAssembly() - .GetCustomAttributes(typeof(AssemblyVersionAttribute), true) - .Cast<AssemblyVersionAttribute>() - .First() - .Version; -#else - + Assembly.GetExecutingAssembly().GetName().Version; -#endif + private static readonly string version = "BCPG C# v" + AssemblyInfo.Version; private readonly IDictionary headers; |