1234567891011121314151617181920212223242526272829303132333435 |
- /*
- * 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<InitiateMultipartUploadResult, InitiateMultipartResult>
- {
- public InitiateMultipartUploadResultDeserializer(IDeserializer<Stream, InitiateMultipartResult> 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
- };
- }
- }
- }
|