Table of Contents

Class AbstractServiceOptions

Namespace
Visus.AddressValidation.Configuration
Assembly
Visus.AddressValidation.dll

Abstract base class for provider-specific address validation service options, providing common environment, endpoint, and sandbox validation behavior.

public abstract class AbstractServiceOptions : IValidatableObject
Inheritance
AbstractServiceOptions
Implements
Derived
Inherited Members

Properties

ClientEnvironment

Gets or sets the target client environment, which determines whether requests are sent to the provider's sandbox or production endpoint. Defaults to DEVELOPMENT.

public ClientEnvironment ClientEnvironment { get; set; }

Property Value

ClientEnvironment

EndpointUri

Gets the base URI of the provider's API endpoint, derived from the current ClientEnvironment value.

public abstract Uri EndpointUri { get; }

Property Value

Uri

EndpointUriOverride

Gets or sets a URI that overrides the default endpoint derived from ClientEnvironment.

public Uri? EndpointUriOverride { get; set; }

Property Value

Uri

Remarks

This property is required when ClientEnvironment is SANDBOX; validation will fail if it is null in that case.

For all other environments this property is optional and, when set, has no effect — the endpoint is always resolved from ClientEnvironment.

Methods

Validate(ValidationContext)

Performs cross-property validation on the options object.

public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext)

Parameters

validationContext ValidationContext

The context in which validation is performed.

Returns

IEnumerable<ValidationResult>

A collection of ValidationResult instances describing any validation failures, or an empty collection if the options are valid.

Remarks

Validates that EndpointUriOverride is not null when ClientEnvironment is SANDBOX, since the sandbox environment requires an explicit endpoint to target a local mock server.