/* * Copyright (C) Alibaba Cloud Computing * All rights reserved. * * 版权所有 (C)阿里云计算有限公司 */ using System.IO; using Aliyun.OSS.Common.Communication; using Aliyun.OSS.Model; namespace Aliyun.OSS.Transform { internal class InitiateMultipartUploadResultDeserializer : ResponseDeserializer { public InitiateMultipartUploadResultDeserializer(IDeserializer contentDeserializer) : base(contentDeserializer) { } public override InitiateMultipartUploadResult Deserialize(ServiceResponse xmlStream) { var result = ContentDeserializer.Deserialize(xmlStream.Content); string encodeType = result.EncodingType == null ? string.Empty : result.EncodingType.ToLowerInvariant(); return new InitiateMultipartUploadResult { BucketName = result.Bucket, Key = Decode(result.Key, encodeType), UploadId = result.UploadId }; } } }