Table of Contents

Interface IFinancialDataClientBuilder

Namespace
Tudormobile.FinancialData
Assembly
Tudormobile.FinancialData.dll

Provides a fluent interface for configuring and building instances of IFinancialDataClient.

public interface IFinancialDataClientBuilder

Methods

AddLogging(ILogger)

Adds the specified logger to the client builder for capturing diagnostic and operational messages.

IFinancialDataClientBuilder AddLogging(ILogger logger)

Parameters

logger ILogger

The logger instance to use for logging client activity. Cannot be null.

Returns

IFinancialDataClientBuilder

The current instance of the client builder for method chaining.

Build()

Builds and returns a configured instance of IFinancialDataClient using the settings specified through the builder.

IFinancialDataClient Build()

Returns

IFinancialDataClient

A fully configured IFinancialDataClient instance ready to interact with the financial data API.

WithApiKey(string)

Configures the client builder to use the specified API key for authenticating requests to the financial data service.

IFinancialDataClientBuilder WithApiKey(string apiKey)

Parameters

apiKey string

The API key used to authenticate requests. This value must be a non-empty string and cannot be null.

Returns

IFinancialDataClientBuilder

The current builder instance configured to use the specified API key.

WithHttpClient(HttpClient)

Configures the builder to use the specified HTTP client for sending requests to the financial data API.

IFinancialDataClientBuilder WithHttpClient(HttpClient httpClient)

Parameters

httpClient HttpClient

The HTTP client instance to use for all outgoing API requests. Cannot be null. The caller is responsible for managing the lifetime of the provided client.

Returns

IFinancialDataClientBuilder

The current builder instance configured to use the specified HTTP client.

Remarks

Use this method to provide a custom-configured HttpClient, for example to set custom headers, proxies, or timeouts. If not set, a default HttpClient may be used by the implementation.

WithSerializer(IFinancialDataSerializer)

Configures the builder to use the specified serializer for handling API response data.

IFinancialDataClientBuilder WithSerializer(IFinancialDataSerializer serializer)

Parameters

serializer IFinancialDataSerializer

The serializer instance to use for serializing and deserializing API data. Cannot be null.

Returns

IFinancialDataClientBuilder

The current instance of the client builder for method chaining.