Skip to main content

Definition

Assembly: CloudNimble.EasyAF.ODataClient.dll Namespace: CloudNimble.EasyAF.OData Inheritance: Simple.OData.Client.ODataBatch

Syntax

CloudNimble.EasyAF.OData.ApiBatch

Summary

Provides a pre-configured Simple.OData.V4 ODataBatch Client.

Constructors

.ctor

Initializes a new instance of the Simple.OData.Client.ODataClient class with custom configuration

Syntax

public ApiBatch(System.Net.Http.IHttpClientFactory httpClientFactory, CloudNimble.EasyAF.Configuration.ConfigurationBase configurationBase, string apiClientName = null)

Parameters

NameTypeDescription
httpClientFactorySystem.Net.Http.IHttpClientFactoryAn IHttpClientFactory instance, provided by DI.
configurationBaseCloudNimble.EasyAF.Configuration.ConfigurationBaseA ConfigurationBase instance, containing the name identifier for the HttpClient.
apiClientNamestringOptional name for the API client. If not provided, uses the ApiClientName from the configuration.

Methods

Add

Overloads the Add operator used to add IODataClient operations to the ODataBatch. Provides an alternative method-based syntax for adding operations to the batch.

Syntax

public static CloudNimble.EasyAF.OData.ApiBatch Add(CloudNimble.EasyAF.OData.ApiBatch batch, System.Func<Simple.OData.Client.IODataClient, System.Threading.Tasks.Task> action)

Parameters

NameTypeDescription
batchCloudNimble.EasyAF.OData.ApiBatchThe ApiBatch instance to add the operation to.
actionSystem.Func<Simple.OData.Client.IODataClient, System.Threading.Tasks.Task>The async operation to add to the batch.

Returns

Type: CloudNimble.EasyAF.OData.ApiBatch The ApiBatch instance for method chaining.