forked from BornToBeRoot/NETworkManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssemblyManager.cs
More file actions
33 lines (28 loc) · 866 Bytes
/
Copy pathAssemblyManager.cs
File metadata and controls
33 lines (28 loc) · 866 Bytes
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
32
33
using System.IO;
using System.Reflection;
namespace NETworkManager.Settings;
/// <summary>
/// Class contains information about the current executing assembly.
/// </summary>
public static class AssemblyManager
{
/// <summary>
/// Creates a new instance of the <see cref="AssemblyManager" /> class and
/// sets the <see cref="Current" /> property on the first call.
/// </summary>
static AssemblyManager()
{
var assembly = Assembly.GetEntryAssembly();
var name = assembly.GetName();
Current = new AssemblyInfo
{
Version = name.Version,
Location = Path.GetDirectoryName(assembly.Location),
Name = name.Name
};
}
/// <summary>
/// Current executing assembly.
/// </summary>
public static AssemblyInfo Current { get; set; }
}