Class Converter
The class that converts SDK request object into HttpRequestMessage, and converts HttpResponseMessage into SDK response object.
Inherited Members
Namespace: Oci.Common
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class Converter
Fields
logger
Declaration
protected static readonly Logger logger
Field Value
Type | Description |
---|---|
Logger |
Methods
FromHttpResponseMessage<T>(HttpResponseMessage)
Converts HttpResponseMessage into SDK response object.
Declaration
public static T FromHttpResponseMessage<T>(HttpResponseMessage responseMessage) where T : IOciResponse, new()
Parameters
Type | Name | Description |
---|---|---|
HttpResponseMessage | responseMessage | An HttpResponseMessage object |
Returns
Type | Description |
---|---|
T | A SDK response object. |
Type Parameters
Name | Description |
---|---|
T |
ToHttpRequestMessage<T>(Uri, HttpMethod, T)
Converts SDK request object into HttpRequestMessage.
Declaration
public static HttpRequestMessage ToHttpRequestMessage<T>(Uri uri, HttpMethod method, T request) where T : IOciRequest
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The uri of this http request. |
HttpMethod | method | The method of this http request. |
T | request | The SDK object for this request. |
Returns
Type | Description |
---|---|
HttpRequestMessage | An HttpRequestMessage that can be sent by HttpClient. |
Type Parameters
Name | Description |
---|---|
T |