AppendObjectResult.cs 944 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using COSXML.Model.Tag;
  5. using COSXML.Transfer;
  6. namespace COSXML.Model.Object
  7. {
  8. /// <summary>
  9. /// 使用Append接口的返回Result.
  10. /// </summary>
  11. public sealed class AppendObjectResult : CosResult
  12. {
  13. /// <summary>
  14. /// Append结果信息
  15. /// <see href="Model.Tag.CopyObject"/>
  16. /// </summary>
  17. public long nextAppendPosition {get; set;}
  18. internal override void InternalParseResponseHeaders()
  19. {
  20. List<string> values;
  21. this.responseHeaders.TryGetValue("x-cos-next-append-position", out values);
  22. if (values != null && values.Count > 0)
  23. {
  24. long tmpPosition;
  25. if (long.TryParse(values[0], out tmpPosition))
  26. {
  27. nextAppendPosition = tmpPosition;
  28. }
  29. }
  30. }
  31. }
  32. }