PowerToys/Wox.Core/Version/VersionManager.cs

37 lines
879 B
C#
Raw Normal View History

2015-01-11 21:52:30 +08:00
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;
}
}
}
}