summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Server/Utils/DotnetUtils.cs
blob: 48a0ac0a8cb807577579b051107e52ff4f77b5b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System.Reflection;

namespace Impostor.Server.Utils
{
    internal static class DotnetUtils
    {
        private const string DefaultUnknownBuild = "UNKNOWN";

        public static string GetVersion()
        {
            var attribute = typeof(DotnetUtils).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
            if (attribute != null)
            {
                return attribute.InformationalVersion;
            }

            return DefaultUnknownBuild;
        }
    }
}