DeleteObjectsResult.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (C) Alibaba Cloud Computing
  3. * All rights reserved.
  4. *
  5. * 版权所有 (C)阿里云计算有限公司
  6. */
  7. using System.Xml.Serialization;
  8. using Aliyun.OSS.Util;
  9. namespace Aliyun.OSS
  10. {
  11. /// <summary>
  12. /// Description of DeleteObjectsResult.
  13. /// </summary>
  14. [XmlRoot("DeleteResult")]
  15. public class DeleteObjectsResult
  16. {
  17. private DeletedObject[] _keys;
  18. /// <summary>
  19. /// Deleted部分的解析和获取
  20. /// </summary>
  21. [XmlElement("Deleted")]
  22. public DeletedObject[] Keys
  23. {
  24. get
  25. {
  26. if (EncodingType == null)
  27. return _keys;
  28. bool isUrlEncoding = EncodingType.ToLowerInvariant().Equals(HttpUtils.UrlEncodingType);
  29. foreach (var key in _keys)
  30. {
  31. key.Key = isUrlEncoding ? HttpUtils.DecodeUri(key.Key) : key.Key;
  32. }
  33. return _keys;
  34. }
  35. set
  36. {
  37. this._keys = value;
  38. }
  39. }
  40. /// <summary>
  41. /// EncodingType值的解析和获取
  42. /// </summary>
  43. [XmlElement("EncodingType")]
  44. public string EncodingType { get; set; }
  45. internal DeleteObjectsResult()
  46. {
  47. }
  48. /// <summary>
  49. /// Deleted部分的解析和获取
  50. /// </summary>
  51. [XmlRoot("Deleted")]
  52. public class DeletedObject
  53. {
  54. /// <summary>
  55. /// Deleted Key的解析和获取
  56. /// </summary>
  57. [XmlElement("Key")]
  58. public string Key { get; set; }
  59. }
  60. }
  61. }