Class AbstractAddressValidationResponse
- Namespace
- Visus.AddressValidation.Models
- Assembly
- Visus.AddressValidation.dll
Base class for implementing an IAddressValidationResponse.
public abstract class AbstractAddressValidationResponse : IAddressValidationResponse
- Inheritance
-
AbstractAddressValidationResponse
- Implements
- Derived
- Inherited Members
Constructors
AbstractAddressValidationResponse(IValidationResult?)
Initializes a new instance of AbstractAddressValidationResponse.
protected AbstractAddressValidationResponse(IValidationResult? validationResult = null)
Parameters
validationResultIValidationResultThe current validation state of the response, or null if no validation was performed.
Properties
AddressLines
Gets the validated address lines returned by the provider.
public IReadOnlySet<string> AddressLines { get; init; }
Property Value
CityOrTown
Gets the validated city or town name returned by the provider.
public string? CityOrTown { get; init; }
Property Value
Country
Gets the country code
public CountryCode Country { get; init; }
Property Value
Remarks
Refer to CountryCode for accepted values.
CustomResponseData
Gets custom response data
public IReadOnlyDictionary<string, object?> CustomResponseData { get; init; }
Property Value
Remarks
Collection may be empty for services that do not provide additional response information.
Errors
Gets the set of error messages produced during request or response validation; empty when validation succeeds.
public IReadOnlySet<string> Errors { get; }
Property Value
IsResidential
Gets the residential indicator for the address
public bool? IsResidential { get; init; }
Property Value
- bool?
Remarks
Value may be null for services that do not return an indicator.
PostalCode
Gets the zip (postal) code
public string? PostalCode { get; init; }
Property Value
Remarks
Value may be omitted for countries that do not support the concept of a postal code.
StateOrProvince
Gets the state (province)
public string? StateOrProvince { get; init; }
Property Value
Remarks
Value may be omitted for countries that are considered city-states.
Suggestions
Gets suggested addresses created during validation
public IReadOnlyList<IAddressValidationResponse> Suggestions { get; init; }
Property Value
Remarks
Collection may be empty if no suggestions provided or validation service does not provide them.
Warnings
Gets the set of warning messages produced during request or response validation; empty when no warnings are present.
public IReadOnlySet<string> Warnings { get; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.