Interface IBatchApiResponseMapper<TResponse>
- Namespace
- Visus.AddressValidation.Mappers
- Assembly
- Visus.AddressValidation.dll
Abstraction for mapping a single item within a batch API response to an IAddressValidationResponse.
public interface IBatchApiResponseMapper<in TResponse> where TResponse : class
Type Parameters
TResponseThe type of the underlying API response.
Methods
Map(TResponse, int, IValidationResult?)
Maps the item at index within response to an instance that
implements IAddressValidationResponse.
IAddressValidationResponse Map(TResponse response, int index, IValidationResult? validationResult = null)
Parameters
responseTResponseThe underlying batch API response returned by the address validation service.
indexintThe position, within the batch, of the item to map.
validationResultIValidationResultCurrent validation state (if any) of the item represented as an instance of IValidationResult.
Returns
- IAddressValidationResponse
An instance that implements IAddressValidationResponse.