GetObjectResult.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.IO;
  5. using COSXML.CosException;
  6. using COSXML.Common;
  7. namespace COSXML.Model.Object
  8. {
  9. /// <summary>
  10. /// 下载对象返回的结果
  11. /// <see href="https://cloud.tencent.com/document/product/436/7753"/>
  12. /// </summary>
  13. public sealed class GetObjectResult : CosResult
  14. {
  15. /// <summary>
  16. /// 对象的 eTag
  17. /// </summary>
  18. public string eTag;
  19. /// <summary>
  20. /// 对象的 crc64
  21. /// </summary>
  22. public string crc64ecma;
  23. internal override void InternalParseResponseHeaders()
  24. {
  25. List<string> values;
  26. this.responseHeaders.TryGetValue("ETag", out values);
  27. if (values != null && values.Count > 0)
  28. {
  29. eTag = values[0];
  30. }
  31. this.responseHeaders.TryGetValue("x-cos-hash-crc64ecma", out values);
  32. if (values != null && values.Count > 0)
  33. {
  34. crc64ecma = values[0];
  35. }
  36. }
  37. }
  38. }