AppVersionHelper.cs 716 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.IO;
  3. using Abp.Reflection.Extensions;
  4. namespace VberAdmin;
  5. /// <summary>
  6. /// 应用程序版本的中心点
  7. /// </summary>
  8. public class AppVersionHelper
  9. {
  10. /// <summary>
  11. /// 获取应用程序的当前版本。
  12. /// 它也显示在网页中。
  13. /// </summary>
  14. public const string Version = "1.0.0.0";
  15. /// <summary>
  16. /// 获取应用程序的发布(上次构建)日期。
  17. /// 它也显示在网页中。
  18. /// </summary>
  19. public static DateTime ReleaseDate => LzyReleaseDate.Value;
  20. private static readonly Lazy<DateTime> LzyReleaseDate = new Lazy<DateTime>(() => new FileInfo(typeof(AppVersionHelper).GetAssembly().Location).LastWriteTime);
  21. }