TriLibVersionInfo.cs 944 B

12345678910111213141516171819202122232425262728293031323334
  1. namespace TriLibCore.Editor
  2. {
  3. public class TriLibVersionInfo
  4. {
  5. private static TriLibVersionInfo _instance;
  6. public string CurrentVersion
  7. {
  8. get
  9. {
  10. var assembly = System.Reflection.Assembly.GetAssembly(typeof(TriLibCore.ReaderBase));
  11. var fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
  12. return fileVersionInfo.ProductVersion;
  13. }
  14. }
  15. public string SkipVersionInfoKey
  16. {
  17. get { return $"TriLibSkipVersionInfo{CurrentVersion}"; }
  18. }
  19. public static TriLibVersionInfo Instance
  20. {
  21. get
  22. {
  23. if (_instance == null)
  24. {
  25. _instance = new TriLibVersionInfo();
  26. }
  27. return _instance;
  28. }
  29. }
  30. }
  31. }