FullPackage.cs 757 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. namespace Update.Core.Entities
  3. {
  4. /// <summary>
  5. /// 全量更新包
  6. /// </summary>
  7. public class FullPackage : IPackage, IComparable<FullPackage>
  8. {
  9. /// <summary>
  10. /// 更新包文件名
  11. /// </summary>
  12. public string FileName { get; set; }
  13. /// <summary>
  14. /// 目标版本
  15. /// </summary>
  16. public Version To { get; set; }
  17. /// <summary>
  18. /// 比较
  19. /// </summary>
  20. /// <param name="other">要比较的更新包</param>
  21. /// <returns>如果较新返回正数,较旧返回负数,相等返回 0</returns>
  22. public int CompareTo(FullPackage other)
  23. {
  24. return this.To.CompareTo(other.To);
  25. }
  26. }
  27. }