Table of Contents

Class Address

Namespace
TCSystem.MetaData
Assembly
TCSystem.MetaData.dll

Represents the textual parts of a geographic address.

public sealed class Address : IEquatable<Address>
Inheritance
Address
Implements
Inherited Members

Constructors

Address(string, string, string, string)

Represents the textual parts of a geographic address.

public Address(string _country = "", string _province = "", string _city = "", string _street = "")

Parameters

_country string

The country name.

_province string

The province or state name.

_city string

The city name.

_street string

The street address.

Properties

City

Gets the city name.

public string City { get; }

Property Value

string

Country

Gets the country name.

public string Country { get; }

Property Value

string

FormattedAddress

Gets the non-empty address parts joined from street to country.

public string FormattedAddress { get; }

Property Value

string

IsAllSet

Gets whether every address part is set.

public bool IsAllSet { get; }

Property Value

bool

IsSet

Gets whether at least one address part is set.

public bool IsSet { get; }

Property Value

bool

NotFound

Gets the sentinel address used when an address lookup found no result.

public static Address NotFound { get; }

Property Value

Address

Province

Gets the province or state name.

public string Province { get; }

Property Value

string

Street

Gets the street address.

public string Street { get; }

Property Value

string

Undefined

Gets an address with no defined parts.

public static Address Undefined { get; }

Property Value

Address

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.

Equals(Address)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Address other)

Parameters

other Address

An object to compare with this object.

Returns

bool

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

FromJsonString(string)

Deserializes an address from JSON.

public static Address FromJsonString(string jsonString)

Parameters

jsonString string

The JSON to deserialize.

Returns

Address

The address, or null when the input is null or empty.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToJsonString()

Serializes the address to compact JSON.

public string ToJsonString()

Returns

string

The serialized address.

ToString()

Serializes the address to indented JSON.

public override string ToString()

Returns

string

The formatted address JSON.