Interface IApiRequestAdapter<TRequest, TApiResponse>
- Namespace
- Visus.AddressValidation.Adapters
- Assembly
- Visus.AddressValidation.dll
Defines an adapter that translates an address validation request into an API-specific request and returns the corresponding API response.
public interface IApiRequestAdapter<in TRequest, TApiResponse> where TRequest : AbstractAddressValidationRequest where TApiResponse : class
Type Parameters
TRequestThe type of the address validation request, which must derive from AbstractAddressValidationRequest.
TApiResponseThe type of the API response returned by the underlying service.
Methods
ExecuteAsync(TRequest, CancellationToken)
Executes the address validation request against the underlying API and returns the raw API response.
Task<TApiResponse?> ExecuteAsync(TRequest request, CancellationToken cancellationToken)
Parameters
requestTRequestThe address validation request to execute.
cancellationTokenCancellationTokenA token that can be used to cancel the asynchronous operation.