RequestSerializer.cs 591 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (C) Alibaba Cloud Computing
  3. * All rights reserved.
  4. *
  5. * 版权所有 (C)阿里云计算有限公司
  6. */
  7. using System.IO;
  8. namespace Aliyun.OSS.Transform
  9. {
  10. internal abstract class RequestSerializer<TRequest, TModel> : ISerializer<TRequest, Stream>
  11. {
  12. protected ISerializer<TModel, Stream> ContentSerializer { get; private set; }
  13. public RequestSerializer(ISerializer<TModel, Stream> contentSerializer)
  14. {
  15. ContentSerializer = contentSerializer;
  16. }
  17. public abstract Stream Serialize(TRequest request);
  18. }
  19. }