| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | #nullable enable |
| | 5 | |
|
| | 6 | | namespace Azure.Core |
| | 7 | | { |
| | 8 | | internal class ResponseWithHeaders<THeaders> |
| | 9 | | { |
| | 10 | | private readonly Response _rawResponse; |
| | 11 | |
|
| 8 | 12 | | public ResponseWithHeaders(THeaders headers, Response rawResponse) |
| | 13 | | { |
| 8 | 14 | | _rawResponse = rawResponse; |
| 8 | 15 | | Headers = headers; |
| 8 | 16 | | } |
| | 17 | |
|
| 8 | 18 | | public Response GetRawResponse() => _rawResponse; |
| | 19 | |
|
| 16 | 20 | | public THeaders Headers { get; } |
| | 21 | |
|
| 4 | 22 | | public static implicit operator Response(ResponseWithHeaders<THeaders> self) => self.GetRawResponse(); |
| | 23 | | } |
| | 24 | | } |