Table of Contents

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

validationResult IValidationResult

The 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

IReadOnlySet<string>

CityOrTown

Gets the validated city or town name returned by the provider.

public string? CityOrTown { get; init; }

Property Value

string

Country

Gets the country code

public CountryCode Country { get; init; }

Property Value

CountryCode

Remarks

Refer to CountryCode for accepted values.

CustomResponseData

Gets custom response data

public IReadOnlyDictionary<string, object?> CustomResponseData { get; init; }

Property Value

IReadOnlyDictionary<string, object>

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

IReadOnlySet<string>

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

string

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

string

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

IReadOnlyList<IAddressValidationResponse>

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

IReadOnlySet<string>

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.