mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 03:59:15 +08:00
37 lines
879 B
C#
37 lines
879 B
C#
|
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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|