LUSID C# SDK
|
Provides a default implementation of an Api client (both synchronous and asynchronous implementations), encapsulating general REST accessor use cases. More...
Public Member Functions | |
ApiClient () | |
Initializes a new instance of the ApiClient, defaulting to the global configurations' base url. More... | |
ApiClient (string basePath, Func< RestClientOptions, HttpMessageHandler >? CreateHttpMessageHandler=null, bool disposeHandler=true, Func< RestClientOptions, IReadableConfiguration, IRestClientWrapper > createRestClientFunc=null) | |
Initializes a new instance of the ApiClient More... | |
Task< ApiResponse< T > > | GetAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP GET request (async). More... | |
Task< ApiResponse< T > > | PostAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP POST request (async). More... | |
Task< ApiResponse< T > > | PutAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP PUT request (async). More... | |
Task< ApiResponse< T > > | DeleteAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP DELETE request (async). More... | |
Task< ApiResponse< T > > | HeadAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP HEAD request (async). More... | |
Task< ApiResponse< T > > | OptionsAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP OPTION request (async). More... | |
Task< ApiResponse< T > > | PatchAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken)) |
Make a HTTP PATCH request (async). More... | |
ApiResponse< T > | Get< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP GET request (synchronous). More... | |
ApiResponse< T > | Post< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP POST request (synchronous). More... | |
ApiResponse< T > | Put< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP PUT request (synchronous). More... | |
ApiResponse< T > | Delete< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP DELETE request (synchronous). More... | |
ApiResponse< T > | Head< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP HEAD request (synchronous). More... | |
ApiResponse< T > | Options< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP OPTION request (synchronous). More... | |
ApiResponse< T > | Patch< T > (string path, RequestOptions options, IReadableConfiguration configuration=null) |
Make a HTTP PATCH request (synchronous). More... | |
Static Public Member Functions | |
static ? Policy< RestResponse > | GetSyncPolicy (RequestOptions options) |
Returns the policy configured for executing synchronous requests More... | |
static ? AsyncPolicy< RestResponse > | GetAsyncPolicy (RequestOptions options) |
Returns the policy configured for executing asynchronous requests More... | |
Properties | |
JsonSerializerSettings | SerializerSettings [get, set] |
Specifies the settings on a JsonSerializer object. These settings can be adjusted to accommodate custom serialization rules. More... | |
Provides a default implementation of an Api client (both synchronous and asynchronous implementations), encapsulating general REST accessor use cases.
|
inline |
Initializes a new instance of the ApiClient, defaulting to the global configurations' base url.
|
inline |
Initializes a new instance of the ApiClient
basePath | The target service's base path in URL format. |
CreateHttpMessageHandler | A function to create a HttpMessageHandler for each REST request |
disposeHandler | Should the HttpMessageHandler be disposed of after each request |
createRestClientFunc | A function that given configuration will return an implementation of the IRestClientWrapper interface. Use to override the default RestClient |
ArgumentException |
|
inline |
Make a HTTP DELETE request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP DELETE request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
inline |
Make a HTTP GET request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP GET request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
inlinestatic |
Returns the policy configured for executing asynchronous requests
options |
|
inlinestatic |
Returns the policy configured for executing synchronous requests
options |
|
inline |
Make a HTTP HEAD request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP HEAD request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
inline |
Make a HTTP OPTION request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP OPTION request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
inline |
Make a HTTP PATCH request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP PATCH request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
inline |
Make a HTTP POST request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP POST request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
inline |
Make a HTTP PUT request (synchronous).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
Implements Lusid.Sdk.Client.ISynchronousClient.
|
inline |
Make a HTTP PUT request (async).
path | The target path (or resource). |
options | The additional request options. |
configuration | A per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method. |
cancellationToken | Token that enables callers to cancel the request. |
Implements Lusid.Sdk.Client.IAsynchronousClient.
|
getset |
Specifies the settings on a JsonSerializer object. These settings can be adjusted to accommodate custom serialization rules.