DeleteObjectsResultDeserializer.cs 858 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (C) Alibaba Cloud Computing
  3. * All rights reserved.
  4. *
  5. * 版权所有 (C)阿里云计算有限公司
  6. */
  7. using System.IO;
  8. using Aliyun.OSS.Common.Communication;
  9. using Aliyun.OSS.Util;
  10. namespace Aliyun.OSS.Transform
  11. {
  12. internal class DeleteObjectsResultDeserializer : ResponseDeserializer<DeleteObjectsResult, DeleteObjectsResult>
  13. {
  14. public DeleteObjectsResultDeserializer(IDeserializer<Stream, DeleteObjectsResult> contentDeserializer)
  15. : base(contentDeserializer)
  16. { }
  17. public override DeleteObjectsResult Deserialize(ServiceResponse xmlStream)
  18. {
  19. if (int.Parse(xmlStream.Headers[HttpHeaders.ContentLength]) == 0)
  20. return new DeleteObjectsResult();
  21. return ContentDeserializer.Deserialize(xmlStream.Content);
  22. }
  23. }
  24. }