PutObjectResult.cs 1.2 KB

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