summaryrefslogtreecommitdiffstats
path: root/src/main.lib/Services/VersionService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.lib/Services/VersionService.cs')
-rw-r--r--src/main.lib/Services/VersionService.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main.lib/Services/VersionService.cs b/src/main.lib/Services/VersionService.cs
new file mode 100644
index 0000000..3383d12
--- /dev/null
+++ b/src/main.lib/Services/VersionService.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Reflection;
+
+namespace PKISharp.WACS.Services
+{
+ public class VersionService
+ {
+ public string Bitness => Environment.Is64BitProcess ? "64-bit" : "32-bit";
+
+ public string BuildType
+ {
+ get
+ {
+ var build = "";
+#if DEBUG
+ build += "DEBUG";
+#else
+ build += "RELEASE";
+#endif
+#if PLUGGABLE
+ build += ", PLUGGABLE";
+#else
+ build += ", TRIMMED";
+#endif
+ return build;
+ }
+ }
+
+ public Version SoftwareVersion => Assembly.GetEntryAssembly().GetName().Version;
+ }
+}