mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Add Wox.CrashReporter
This commit is contained in:
36
Wox.Core/Version/VersionManager.cs
Normal file
36
Wox.Core/Version/VersionManager.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace Wox.Core.Version
|
||||
{
|
||||
public class VersionManager
|
||||
{
|
||||
private static VersionManager versionManager;
|
||||
private static SemanticVersion currentVersion;
|
||||
|
||||
public static VersionManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (versionManager == null)
|
||||
{
|
||||
versionManager = new VersionManager();
|
||||
}
|
||||
return versionManager;
|
||||
}
|
||||
}
|
||||
|
||||
private VersionManager() { }
|
||||
|
||||
public SemanticVersion CurrentVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (currentVersion == null)
|
||||
{
|
||||
currentVersion = new SemanticVersion(Assembly.GetExecutingAssembly().GetName().Version);
|
||||
}
|
||||
return currentVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user