ModelFileInformation.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:ModelFileInformation
  3. * 作者:xulisong
  4. * 创建时间: 2019/7/1 11:47:42
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace SAGA.RevitUtils.ExtensibleStorage
  13. {
  14. /// <summary>
  15. /// 模型文件信息
  16. /// </summary>
  17. public class ModelFileInformation: ICoustomStorage
  18. {
  19. public string FileId { get; set; }
  20. public string ProjectId { get; set; }
  21. public string Version { get; set; }
  22. public object GetStorage()
  23. {
  24. Dictionary<string, string> dic = new Dictionary<string, string>();
  25. dic["FileId"] = FileId ?? string.Empty;
  26. dic["ProjectId"] = ProjectId ?? string.Empty;
  27. dic["Version"] = Version ?? string.Empty;
  28. return dic;
  29. }
  30. public void SetStorage(object value)
  31. {
  32. if (value is IDictionary<string, string> dic)
  33. {
  34. this.FileId = dic["FileId"];
  35. this.ProjectId = dic["ProjectId"];
  36. this.Version = dic["Version"];
  37. }
  38. }
  39. }
  40. }