summaryrefslogtreecommitdiffstats
path: root/src/main.lib/Services/VersionService.cs
blob: 3383d12ff48cd29787d7ce64395d7b75720bb2be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
    }
}