| | 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 | |
|
| 852 | 12 | | public ResponseWithHeaders(THeaders headers, Response rawResponse) |
| | 13 | | { |
| 852 | 14 | | _rawResponse = rawResponse; |
| 852 | 15 | | Headers = headers; |
| 852 | 16 | | } |
| | 17 | |
|
| 852 | 18 | | public Response GetRawResponse() => _rawResponse; |
| | 19 | |
|
| 0 | 20 | | public THeaders Headers { get; } |
| | 21 | |
|
| 852 | 22 | | public static implicit operator Response(ResponseWithHeaders<THeaders> self) => self.GetRawResponse(); |
| | 23 | | } |
| | 24 | | } |