Class ClientBase
An abstract class for a generic service client.
Inheritance
ClientBase
Implements
Inherited Members
Namespace: Oci.Common
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public abstract class ClientBase : IDisposable
Constructors
ClientBase(IBasicAuthenticationDetailsProvider)
Constructor of a service client.
Declaration
public ClientBase(IBasicAuthenticationDetailsProvider authProvider)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authProvider | The authentication details provider. |
ClientBase(IBasicAuthenticationDetailsProvider, ClientConfiguration)
Constructor of a service client.
Declaration
public ClientBase(IBasicAuthenticationDetailsProvider authProvider, ClientConfiguration clientConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authProvider | The authentication details provider. |
ClientConfiguration | clientConfiguration | A client configuration to customize client. |
ClientBase(IBasicAuthenticationDetailsProvider, ClientConfiguration, RequestSigner)
Constructor of a service client.
Declaration
public ClientBase(IBasicAuthenticationDetailsProvider authProvider, ClientConfiguration clientConfiguration, RequestSigner requestSigner)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authProvider | The authentication details provider. |
ClientConfiguration | clientConfiguration | A client configuration to customize client. |
RequestSigner | requestSigner | A request signer that will be used to sign requests. |
ClientBase(IBasicAuthenticationDetailsProvider, RequestSigner)
Constructor of a service client.
Declaration
public ClientBase(IBasicAuthenticationDetailsProvider authProvider, RequestSigner requestSigner)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authProvider | The authentication details provider. |
RequestSigner | requestSigner | A request signer that will be used to sign requests. |
Fields
logger
Declaration
protected static Logger logger
Field Value
Type | Description |
---|---|
Logger |
restClient
Declaration
protected readonly RestClient restClient
Field Value
Type | Description |
---|---|
RestClient |
service
Declaration
protected Service service
Field Value
Type | Description |
---|---|
Service |
userAgent
Declaration
protected string userAgent
Field Value
Type | Description |
---|---|
string |
Methods
Dispose()
Disposes the rest client.
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
GetEndpoint()
Retrieves the endpoint Uri.
Declaration
public Uri GetEndpoint()
Returns
Type | Description |
---|---|
Uri |
GetUserAgent()
Declaration
public string GetUserAgent()
Returns
Type | Description |
---|---|
string |
SetEndpoint(string)
Sets the endpoint in the rest client.
Declaration
public void SetEndpoint(string endpoint)
Parameters
Type | Name | Description |
---|---|---|
string | endpoint |
SetRealmSpecificEndpointTemplate(string)
Sets the RealmSpecificEndpointTemplate in the rest client.
Declaration
public void SetRealmSpecificEndpointTemplate(string endpoint)
Parameters
Type | Name | Description |
---|---|---|
string | endpoint |