| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Diagnostics; |
| | | 6 | | using System.Threading.Tasks; |
| | | 7 | | |
| | | 8 | | namespace Azure.Core.Pipeline |
| | | 9 | | { |
| | | 10 | | internal class HttpPipelineTransportPolicy : HttpPipelinePolicy |
| | | 11 | | { |
| | | 12 | | private readonly HttpPipelineTransport _transport; |
| | | 13 | | |
| | 1348 | 14 | | public HttpPipelineTransportPolicy(HttpPipelineTransport transport) |
| | | 15 | | { |
| | 1348 | 16 | | _transport = transport; |
| | 1348 | 17 | | } |
| | | 18 | | |
| | | 19 | | public override ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory<HttpPipelinePolicy> pipeline) |
| | | 20 | | { |
| | | 21 | | Debug.Assert(pipeline.IsEmpty); |
| | | 22 | | |
| | 1608 | 23 | | return _transport.ProcessAsync(message); |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public override void Process(HttpMessage message, ReadOnlyMemory<HttpPipelinePolicy> pipeline) |
| | | 27 | | { |
| | | 28 | | Debug.Assert(pipeline.IsEmpty); |
| | | 29 | | |
| | 1560 | 30 | | _transport.Process(message); |
| | 1518 | 31 | | } |
| | | 32 | | } |
| | | 33 | | } |