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 IValidationResult, or null if no validation ran.
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 the custom response data.
public IReadOnlyDictionary<string, object?> CustomResponseData { get; init; }
Property Value
Remarks
The collection is empty for providers that offer no additional response information.
Errors
Gets the set of error messages from request or response validation. The set is 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 providers that do not return an indicator.
PostalCode
Gets the 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 or province.
public string? StateOrProvince { get; init; }
Property Value
Remarks
Value may be omitted for countries that are considered city-states.
Suggestions
Gets the suggested addresses created during validation.
public IReadOnlyList<IAddressValidationResponse> Suggestions { get; init; }
Property Value
Remarks
The collection is empty when the provider offers no suggestions.
Warnings
Gets the set of warning messages from request or response validation. The set is empty when no warnings exist.
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.