Table of Contents

Class Location

Namespace
TCSystem.MetaData
Assembly
TCSystem.MetaData.dll

Combines a textual address with a GPS point.

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

Constructors

Location(Address, GpsPoint)

Combines a textual address with a GPS point.

public Location(Address _address, GpsPoint _point)

Parameters

_address Address

The textual address.

_point GpsPoint

The GPS point.

Properties

Address

Gets the address, or Undefined.

public Address Address { get; }

Property Value

Address

IsAllSet

Gets whether both the GPS point and at least one address part are set.

public bool IsAllSet { get; }

Property Value

bool

IsSet

Gets whether either the GPS point or at least one address part is set.

public bool IsSet { get; }

Property Value

bool

NoLocation

Gets the sentinel location with no address or GPS point.

public static Location NoLocation { get; }

Property Value

Location

Point

Gets the GPS point, or Undefined.

public GpsPoint Point { get; }

Property Value

GpsPoint

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(Location)

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

public bool Equals(Location other)

Parameters

other Location

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 a location from JSON.

public static Location FromJsonString(string jsonString)

Parameters

jsonString string

Returns

Location

The location, or null for null or empty input.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToJsonString()

Serializes the location to compact JSON.

public string ToJsonString()

Returns

string

The serialized location.

ToString()

Serializes the location to indented JSON.

public override string ToString()

Returns

string

The formatted JSON.